//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto/tree/main/CodeGenerator. DO NOT EDIT.

import Foundation
import SotoCore

extension Connect {
    // MARK: Enums

    public enum Channel: String, CustomStringConvertible, Codable {
        case chat = "CHAT"
        case task = "TASK"
        case voice = "VOICE"
        public var description: String { return self.rawValue }
    }

    public enum Comparison: String, CustomStringConvertible, Codable {
        case lt = "LT"
        public var description: String { return self.rawValue }
    }

    public enum ContactFlowType: String, CustomStringConvertible, Codable {
        case agentHold = "AGENT_HOLD"
        case agentTransfer = "AGENT_TRANSFER"
        case agentWhisper = "AGENT_WHISPER"
        case contactFlow = "CONTACT_FLOW"
        case customerHold = "CUSTOMER_HOLD"
        case customerQueue = "CUSTOMER_QUEUE"
        case customerWhisper = "CUSTOMER_WHISPER"
        case outboundWhisper = "OUTBOUND_WHISPER"
        case queueTransfer = "QUEUE_TRANSFER"
        public var description: String { return self.rawValue }
    }

    public enum CurrentMetricName: String, CustomStringConvertible, Codable {
        case agentsAfterContactWork = "AGENTS_AFTER_CONTACT_WORK"
        case agentsAvailable = "AGENTS_AVAILABLE"
        case agentsError = "AGENTS_ERROR"
        case agentsNonProductive = "AGENTS_NON_PRODUCTIVE"
        case agentsOnCall = "AGENTS_ON_CALL"
        case agentsOnContact = "AGENTS_ON_CONTACT"
        case agentsOnline = "AGENTS_ONLINE"
        case agentsStaffed = "AGENTS_STAFFED"
        case contactsInQueue = "CONTACTS_IN_QUEUE"
        case contactsScheduled = "CONTACTS_SCHEDULED"
        case oldestContactAge = "OLDEST_CONTACT_AGE"
        case slotsActive = "SLOTS_ACTIVE"
        case slotsAvailable = "SLOTS_AVAILABLE"
        public var description: String { return self.rawValue }
    }

    public enum DirectoryType: String, CustomStringConvertible, Codable {
        case connectManaged = "CONNECT_MANAGED"
        case existingDirectory = "EXISTING_DIRECTORY"
        case saml = "SAML"
        public var description: String { return self.rawValue }
    }

    public enum EncryptionType: String, CustomStringConvertible, Codable {
        case kms = "KMS"
        public var description: String { return self.rawValue }
    }

    public enum Grouping: String, CustomStringConvertible, Codable {
        case channel = "CHANNEL"
        case queue = "QUEUE"
        public var description: String { return self.rawValue }
    }

    public enum HistoricalMetricName: String, CustomStringConvertible, Codable {
        case abandonTime = "ABANDON_TIME"
        case afterContactWorkTime = "AFTER_CONTACT_WORK_TIME"
        case apiContactsHandled = "API_CONTACTS_HANDLED"
        case callbackContactsHandled = "CALLBACK_CONTACTS_HANDLED"
        case contactsAbandoned = "CONTACTS_ABANDONED"
        case contactsAgentHungUpFirst = "CONTACTS_AGENT_HUNG_UP_FIRST"
        case contactsConsulted = "CONTACTS_CONSULTED"
        case contactsHandled = "CONTACTS_HANDLED"
        case contactsHandledIncoming = "CONTACTS_HANDLED_INCOMING"
        case contactsHandledOutbound = "CONTACTS_HANDLED_OUTBOUND"
        case contactsHoldAbandons = "CONTACTS_HOLD_ABANDONS"
        case contactsMissed = "CONTACTS_MISSED"
        case contactsQueued = "CONTACTS_QUEUED"
        case contactsTransferredIn = "CONTACTS_TRANSFERRED_IN"
        case contactsTransferredInFromQueue = "CONTACTS_TRANSFERRED_IN_FROM_QUEUE"
        case contactsTransferredOut = "CONTACTS_TRANSFERRED_OUT"
        case contactsTransferredOutFromQueue = "CONTACTS_TRANSFERRED_OUT_FROM_QUEUE"
        case handleTime = "HANDLE_TIME"
        case holdTime = "HOLD_TIME"
        case interactionAndHoldTime = "INTERACTION_AND_HOLD_TIME"
        case interactionTime = "INTERACTION_TIME"
        case occupancy = "OCCUPANCY"
        case queueAnswerTime = "QUEUE_ANSWER_TIME"
        case queuedTime = "QUEUED_TIME"
        case serviceLevel = "SERVICE_LEVEL"
        public var description: String { return self.rawValue }
    }

    public enum HoursOfOperationDays: String, CustomStringConvertible, Codable {
        case friday = "FRIDAY"
        case monday = "MONDAY"
        case saturday = "SATURDAY"
        case sunday = "SUNDAY"
        case thursday = "THURSDAY"
        case tuesday = "TUESDAY"
        case wednesday = "WEDNESDAY"
        public var description: String { return self.rawValue }
    }

    public enum InstanceAttributeType: String, CustomStringConvertible, Codable {
        case autoResolveBestVoices = "AUTO_RESOLVE_BEST_VOICES"
        case contactLens = "CONTACT_LENS"
        case contactflowLogs = "CONTACTFLOW_LOGS"
        case earlyMedia = "EARLY_MEDIA"
        case inboundCalls = "INBOUND_CALLS"
        case outboundCalls = "OUTBOUND_CALLS"
        case useCustomTtsVoices = "USE_CUSTOM_TTS_VOICES"
        public var description: String { return self.rawValue }
    }

    public enum InstanceStatus: String, CustomStringConvertible, Codable {
        case active = "ACTIVE"
        case creationFailed = "CREATION_FAILED"
        case creationInProgress = "CREATION_IN_PROGRESS"
        public var description: String { return self.rawValue }
    }

    public enum InstanceStorageResourceType: String, CustomStringConvertible, Codable {
        case agentEvents = "AGENT_EVENTS"
        case callRecordings = "CALL_RECORDINGS"
        case chatTranscripts = "CHAT_TRANSCRIPTS"
        case contactTraceRecords = "CONTACT_TRACE_RECORDS"
        case mediaStreams = "MEDIA_STREAMS"
        case scheduledReports = "SCHEDULED_REPORTS"
        public var description: String { return self.rawValue }
    }

    public enum IntegrationType: String, CustomStringConvertible, Codable {
        case event = "EVENT"
        public var description: String { return self.rawValue }
    }

    public enum PhoneNumberCountryCode: String, CustomStringConvertible, Codable {
        case ad = "AD"
        case ae = "AE"
        case af = "AF"
        case ag = "AG"
        case ai = "AI"
        case al = "AL"
        case am = "AM"
        case an = "AN"
        case ao = "AO"
        case aq = "AQ"
        case ar = "AR"
        case `as` = "AS"
        case at = "AT"
        case au = "AU"
        case aw = "AW"
        case az = "AZ"
        case ba = "BA"
        case bb = "BB"
        case bd = "BD"
        case be = "BE"
        case bf = "BF"
        case bg = "BG"
        case bh = "BH"
        case bi = "BI"
        case bj = "BJ"
        case bl = "BL"
        case bm = "BM"
        case bn = "BN"
        case bo = "BO"
        case br = "BR"
        case bs = "BS"
        case bt = "BT"
        case bw = "BW"
        case by = "BY"
        case bz = "BZ"
        case ca = "CA"
        case cc = "CC"
        case cd = "CD"
        case cf = "CF"
        case cg = "CG"
        case ch = "CH"
        case ci = "CI"
        case ck = "CK"
        case cl = "CL"
        case cm = "CM"
        case cn = "CN"
        case co = "CO"
        case cr = "CR"
        case cu = "CU"
        case cv = "CV"
        case cw = "CW"
        case cx = "CX"
        case cy = "CY"
        case cz = "CZ"
        case de = "DE"
        case dj = "DJ"
        case dk = "DK"
        case dm = "DM"
        case `do` = "DO"
        case dz = "DZ"
        case ec = "EC"
        case ee = "EE"
        case eg = "EG"
        case eh = "EH"
        case er = "ER"
        case es = "ES"
        case et = "ET"
        case fi = "FI"
        case fj = "FJ"
        case fk = "FK"
        case fm = "FM"
        case fo = "FO"
        case fr = "FR"
        case ga = "GA"
        case gb = "GB"
        case gd = "GD"
        case ge = "GE"
        case gg = "GG"
        case gh = "GH"
        case gi = "GI"
        case gl = "GL"
        case gm = "GM"
        case gn = "GN"
        case gq = "GQ"
        case gr = "GR"
        case gt = "GT"
        case gu = "GU"
        case gw = "GW"
        case gy = "GY"
        case hk = "HK"
        case hn = "HN"
        case hr = "HR"
        case ht = "HT"
        case hu = "HU"
        case id = "ID"
        case ie = "IE"
        case il = "IL"
        case im = "IM"
        case `in` = "IN"
        case io = "IO"
        case iq = "IQ"
        case ir = "IR"
        case `is` = "IS"
        case it = "IT"
        case je = "JE"
        case jm = "JM"
        case jo = "JO"
        case jp = "JP"
        case ke = "KE"
        case kg = "KG"
        case kh = "KH"
        case ki = "KI"
        case km = "KM"
        case kn = "KN"
        case kp = "KP"
        case kr = "KR"
        case kw = "KW"
        case ky = "KY"
        case kz = "KZ"
        case la = "LA"
        case lb = "LB"
        case lc = "LC"
        case li = "LI"
        case lk = "LK"
        case lr = "LR"
        case ls = "LS"
        case lt = "LT"
        case lu = "LU"
        case lv = "LV"
        case ly = "LY"
        case ma = "MA"
        case mc = "MC"
        case md = "MD"
        case me = "ME"
        case mf = "MF"
        case mg = "MG"
        case mh = "MH"
        case mk = "MK"
        case ml = "ML"
        case mm = "MM"
        case mn = "MN"
        case mo = "MO"
        case mp = "MP"
        case mr = "MR"
        case ms = "MS"
        case mt = "MT"
        case mu = "MU"
        case mv = "MV"
        case mw = "MW"
        case mx = "MX"
        case my = "MY"
        case mz = "MZ"
        case na = "NA"
        case nc = "NC"
        case ne = "NE"
        case ng = "NG"
        case ni = "NI"
        case nl = "NL"
        case no = "NO"
        case np = "NP"
        case nr = "NR"
        case nu = "NU"
        case nz = "NZ"
        case om = "OM"
        case pa = "PA"
        case pe = "PE"
        case pf = "PF"
        case pg = "PG"
        case ph = "PH"
        case pk = "PK"
        case pl = "PL"
        case pm = "PM"
        case pn = "PN"
        case pr = "PR"
        case pt = "PT"
        case pw = "PW"
        case py = "PY"
        case qa = "QA"
        case re = "RE"
        case ro = "RO"
        case rs = "RS"
        case ru = "RU"
        case rw = "RW"
        case sa = "SA"
        case sb = "SB"
        case sc = "SC"
        case sd = "SD"
        case se = "SE"
        case sg = "SG"
        case sh = "SH"
        case si = "SI"
        case sj = "SJ"
        case sk = "SK"
        case sl = "SL"
        case sm = "SM"
        case sn = "SN"
        case so = "SO"
        case sr = "SR"
        case st = "ST"
        case sv = "SV"
        case sx = "SX"
        case sy = "SY"
        case sz = "SZ"
        case tc = "TC"
        case td = "TD"
        case tg = "TG"
        case th = "TH"
        case tj = "TJ"
        case tk = "TK"
        case tl = "TL"
        case tm = "TM"
        case tn = "TN"
        case to = "TO"
        case tr = "TR"
        case tt = "TT"
        case tv = "TV"
        case tw = "TW"
        case tz = "TZ"
        case ua = "UA"
        case ug = "UG"
        case us = "US"
        case uy = "UY"
        case uz = "UZ"
        case va = "VA"
        case vc = "VC"
        case ve = "VE"
        case vg = "VG"
        case vi = "VI"
        case vn = "VN"
        case vu = "VU"
        case wf = "WF"
        case ws = "WS"
        case ye = "YE"
        case yt = "YT"
        case za = "ZA"
        case zm = "ZM"
        case zw = "ZW"
        public var description: String { return self.rawValue }
    }

    public enum PhoneNumberType: String, CustomStringConvertible, Codable {
        case did = "DID"
        case tollFree = "TOLL_FREE"
        public var description: String { return self.rawValue }
    }

    public enum PhoneType: String, CustomStringConvertible, Codable {
        case deskPhone = "DESK_PHONE"
        case softPhone = "SOFT_PHONE"
        public var description: String { return self.rawValue }
    }

    public enum QueueStatus: String, CustomStringConvertible, Codable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum QueueType: String, CustomStringConvertible, Codable {
        case agent = "AGENT"
        case standard = "STANDARD"
        public var description: String { return self.rawValue }
    }

    public enum QuickConnectType: String, CustomStringConvertible, Codable {
        case phoneNumber = "PHONE_NUMBER"
        case queue = "QUEUE"
        case user = "USER"
        public var description: String { return self.rawValue }
    }

    public enum ReferenceType: String, CustomStringConvertible, Codable {
        case url = "URL"
        public var description: String { return self.rawValue }
    }

    public enum SourceType: String, CustomStringConvertible, Codable {
        case salesforce = "SALESFORCE"
        case zendesk = "ZENDESK"
        public var description: String { return self.rawValue }
    }

    public enum Statistic: String, CustomStringConvertible, Codable {
        case avg = "AVG"
        case max = "MAX"
        case sum = "SUM"
        public var description: String { return self.rawValue }
    }

    public enum StorageType: String, CustomStringConvertible, Codable {
        case kinesisFirehose = "KINESIS_FIREHOSE"
        case kinesisStream = "KINESIS_STREAM"
        case kinesisVideoStream = "KINESIS_VIDEO_STREAM"
        case s3 = "S3"
        public var description: String { return self.rawValue }
    }

    public enum Unit: String, CustomStringConvertible, Codable {
        case count = "COUNT"
        case percent = "PERCENT"
        case seconds = "SECONDS"
        public var description: String { return self.rawValue }
    }

    public enum UseCaseType: String, CustomStringConvertible, Codable {
        case rulesEvaluation = "RULES_EVALUATION"
        public var description: String { return self.rawValue }
    }

    public enum VoiceRecordingTrack: String, CustomStringConvertible, Codable {
        case all = "ALL"
        case fromAgent = "FROM_AGENT"
        case toAgent = "TO_AGENT"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AssociateApprovedOriginRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The domain to add to your allow list.
        public let origin: String

        public init(instanceId: String, origin: String) {
            self.instanceId = instanceId
            self.origin = origin
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.origin, name: "origin", parent: name, max: 267)
        }

        private enum CodingKeys: String, CodingKey {
            case origin = "Origin"
        }
    }

    public struct AssociateInstanceStorageConfigRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// A valid resource type.
        public let resourceType: InstanceStorageResourceType
        /// A valid storage type.
        public let storageConfig: InstanceStorageConfig

        public init(instanceId: String, resourceType: InstanceStorageResourceType, storageConfig: InstanceStorageConfig) {
            self.instanceId = instanceId
            self.resourceType = resourceType
            self.storageConfig = storageConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.storageConfig.validate(name: "\(name).storageConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceType = "ResourceType"
            case storageConfig = "StorageConfig"
        }
    }

    public struct AssociateInstanceStorageConfigResponse: AWSDecodableShape {
        /// The existing association identifier that uniquely identifies the resource type and storage config for the given instance ID.
        public let associationId: String?

        public init(associationId: String? = nil) {
            self.associationId = associationId
        }

        private enum CodingKeys: String, CodingKey {
            case associationId = "AssociationId"
        }
    }

    public struct AssociateLambdaFunctionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The Amazon Resource Name (ARN) for the Lambda function being associated. Maximum number of characters allowed is 140.
        public let functionArn: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String

        public init(functionArn: String, instanceId: String) {
            self.functionArn = functionArn
            self.instanceId = instanceId
        }

        public func validate(name: String) throws {
            try self.validate(self.functionArn, name: "functionArn", parent: name, max: 140)
            try self.validate(self.functionArn, name: "functionArn", parent: name, min: 1)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case functionArn = "FunctionArn"
        }
    }

    public struct AssociateLexBotRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The Amazon Lex box to associate with the instance.
        public let lexBot: LexBot

        public init(instanceId: String, lexBot: LexBot) {
            self.instanceId = instanceId
            self.lexBot = lexBot
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.lexBot.validate(name: "\(name).lexBot")
        }

        private enum CodingKeys: String, CodingKey {
            case lexBot = "LexBot"
        }
    }

    public struct AssociateQueueQuickConnectsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "queueId", location: .uri(locationName: "QueueId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The identifier for the queue.
        public let queueId: String
        /// The quick connects to associate with this queue.
        public let quickConnectIds: [String]

        public init(instanceId: String, queueId: String, quickConnectIds: [String]) {
            self.instanceId = instanceId
            self.queueId = queueId
            self.quickConnectIds = quickConnectIds
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.quickConnectIds, name: "quickConnectIds", parent: name, max: 50)
            try self.validate(self.quickConnectIds, name: "quickConnectIds", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case quickConnectIds = "QuickConnectIds"
        }
    }

    public struct AssociateRoutingProfileQueuesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "routingProfileId", location: .uri(locationName: "RoutingProfileId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The queues to associate with this routing profile.
        public let queueConfigs: [RoutingProfileQueueConfig]
        /// The identifier of the routing profile.
        public let routingProfileId: String

        public init(instanceId: String, queueConfigs: [RoutingProfileQueueConfig], routingProfileId: String) {
            self.instanceId = instanceId
            self.queueConfigs = queueConfigs
            self.routingProfileId = routingProfileId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.queueConfigs.forEach {
                try $0.validate(name: "\(name).queueConfigs[]")
            }
            try self.validate(self.queueConfigs, name: "queueConfigs", parent: name, max: 10)
            try self.validate(self.queueConfigs, name: "queueConfigs", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case queueConfigs = "QueueConfigs"
        }
    }

    public struct AssociateSecurityKeyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// A valid security key in PEM format.
        public let key: String

        public init(instanceId: String, key: String) {
            self.instanceId = instanceId
            self.key = key
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, max: 1024)
            try self.validate(self.key, name: "key", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
        }
    }

    public struct AssociateSecurityKeyResponse: AWSDecodableShape {
        /// The existing association identifier that uniquely identifies the resource type and storage config for the given instance ID.
        public let associationId: String?

        public init(associationId: String? = nil) {
            self.associationId = associationId
        }

        private enum CodingKeys: String, CodingKey {
            case associationId = "AssociationId"
        }
    }

    public struct Attribute: AWSDecodableShape {
        /// The type of attribute.
        public let attributeType: InstanceAttributeType?
        /// The value of the attribute.
        public let value: String?

        public init(attributeType: InstanceAttributeType? = nil, value: String? = nil) {
            self.attributeType = attributeType
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case attributeType = "AttributeType"
            case value = "Value"
        }
    }

    public struct ChatMessage: AWSEncodableShape {
        /// The content of the chat message.
        public let content: String
        /// The type of the content. Supported types are text and plain.
        public let contentType: String

        public init(content: String, contentType: String) {
            self.content = content
            self.contentType = contentType
        }

        public func validate(name: String) throws {
            try self.validate(self.content, name: "content", parent: name, max: 1024)
            try self.validate(self.content, name: "content", parent: name, min: 1)
            try self.validate(self.contentType, name: "contentType", parent: name, max: 100)
            try self.validate(self.contentType, name: "contentType", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case content = "Content"
            case contentType = "ContentType"
        }
    }

    public struct ContactFlow: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the contact flow.
        public let arn: String?
        /// The content of the contact flow.
        public let content: String?
        /// The description of the contact flow.
        public let description: String?
        /// The identifier of the contact flow.
        public let id: String?
        /// The name of the contact flow.
        public let name: String?
        /// One or more tags.
        public let tags: [String: String]?
        /// The type of the contact flow. For descriptions of the available types, see Choose a Contact Flow Type in the Amazon Connect Administrator Guide.
        public let type: ContactFlowType?

        public init(arn: String? = nil, content: String? = nil, description: String? = nil, id: String? = nil, name: String? = nil, tags: [String: String]? = nil, type: ContactFlowType? = nil) {
            self.arn = arn
            self.content = content
            self.description = description
            self.id = id
            self.name = name
            self.tags = tags
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case content = "Content"
            case description = "Description"
            case id = "Id"
            case name = "Name"
            case tags = "Tags"
            case type = "Type"
        }
    }

    public struct ContactFlowSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the contact flow.
        public let arn: String?
        /// The type of contact flow.
        public let contactFlowType: ContactFlowType?
        /// The identifier of the contact flow.
        public let id: String?
        /// The name of the contact flow.
        public let name: String?

        public init(arn: String? = nil, contactFlowType: ContactFlowType? = nil, id: String? = nil, name: String? = nil) {
            self.arn = arn
            self.contactFlowType = contactFlowType
            self.id = id
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case contactFlowType = "ContactFlowType"
            case id = "Id"
            case name = "Name"
        }
    }

    public struct CreateContactFlowRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The content of the contact flow.
        public let content: String
        /// The description of the contact flow.
        public let description: String?
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The name of the contact flow.
        public let name: String
        /// One or more tags.
        public let tags: [String: String]?
        /// The type of the contact flow. For descriptions of the available types, see Choose a Contact Flow Type in the Amazon Connect Administrator Guide.
        public let type: ContactFlowType

        public init(content: String, description: String? = nil, instanceId: String, name: String, tags: [String: String]? = nil, type: ContactFlowType) {
            self.content = content
            self.description = description
            self.instanceId = instanceId
            self.name = name
            self.tags = tags
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case content = "Content"
            case description = "Description"
            case name = "Name"
            case tags = "Tags"
            case type = "Type"
        }
    }

    public struct CreateContactFlowResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the contact flow.
        public let contactFlowArn: String?
        /// The identifier of the contact flow.
        public let contactFlowId: String?

        public init(contactFlowArn: String? = nil, contactFlowId: String? = nil) {
            self.contactFlowArn = contactFlowArn
            self.contactFlowId = contactFlowId
        }

        private enum CodingKeys: String, CodingKey {
            case contactFlowArn = "ContactFlowArn"
            case contactFlowId = "ContactFlowId"
        }
    }

    public struct CreateInstanceRequest: AWSEncodableShape {
        /// The idempotency token.
        public let clientToken: String?
        /// The identifier for the directory.
        public let directoryId: String?
        /// The type of identity management for your Amazon Connect users.
        public let identityManagementType: DirectoryType
        /// Your contact center handles incoming contacts.
        public let inboundCallsEnabled: Bool
        /// The name for your instance.
        public let instanceAlias: String?
        /// Your contact center allows outbound calls.
        public let outboundCallsEnabled: Bool

        public init(clientToken: String? = nil, directoryId: String? = nil, identityManagementType: DirectoryType, inboundCallsEnabled: Bool, instanceAlias: String? = nil, outboundCallsEnabled: Bool) {
            self.clientToken = clientToken
            self.directoryId = directoryId
            self.identityManagementType = identityManagementType
            self.inboundCallsEnabled = inboundCallsEnabled
            self.instanceAlias = instanceAlias
            self.outboundCallsEnabled = outboundCallsEnabled
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 500)
            try self.validate(self.directoryId, name: "directoryId", parent: name, max: 12)
            try self.validate(self.directoryId, name: "directoryId", parent: name, min: 12)
            try self.validate(self.directoryId, name: "directoryId", parent: name, pattern: "^d-[0-9a-f]{10}$")
            try self.validate(self.instanceAlias, name: "instanceAlias", parent: name, max: 62)
            try self.validate(self.instanceAlias, name: "instanceAlias", parent: name, min: 1)
            try self.validate(self.instanceAlias, name: "instanceAlias", parent: name, pattern: "^(?!d-)([\\da-zA-Z]+)([-]*[\\da-zA-Z])*$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case directoryId = "DirectoryId"
            case identityManagementType = "IdentityManagementType"
            case inboundCallsEnabled = "InboundCallsEnabled"
            case instanceAlias = "InstanceAlias"
            case outboundCallsEnabled = "OutboundCallsEnabled"
        }
    }

    public struct CreateInstanceResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the instance.
        public let arn: String?
        /// The identifier for the instance.
        public let id: String?

        public init(arn: String? = nil, id: String? = nil) {
            self.arn = arn
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case id = "Id"
        }
    }

    public struct CreateIntegrationAssociationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The Amazon Resource Name (ARN) of the integration.
        public let integrationArn: String
        /// The type of information to be ingested.
        public let integrationType: IntegrationType
        /// The name of the external application.
        public let sourceApplicationName: String
        /// The URL for the external application.
        public let sourceApplicationUrl: String
        /// The type of the data source.
        public let sourceType: SourceType

        public init(instanceId: String, integrationArn: String, integrationType: IntegrationType, sourceApplicationName: String, sourceApplicationUrl: String, sourceType: SourceType) {
            self.instanceId = instanceId
            self.integrationArn = integrationArn
            self.integrationType = integrationType
            self.sourceApplicationName = sourceApplicationName
            self.sourceApplicationUrl = sourceApplicationUrl
            self.sourceType = sourceType
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.sourceApplicationName, name: "sourceApplicationName", parent: name, max: 100)
            try self.validate(self.sourceApplicationName, name: "sourceApplicationName", parent: name, min: 1)
            try self.validate(self.sourceApplicationName, name: "sourceApplicationName", parent: name, pattern: "^[a-zA-Z0-9_ -]+$")
            try self.validate(self.sourceApplicationUrl, name: "sourceApplicationUrl", parent: name, max: 2000)
            try self.validate(self.sourceApplicationUrl, name: "sourceApplicationUrl", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case integrationArn = "IntegrationArn"
            case integrationType = "IntegrationType"
            case sourceApplicationName = "SourceApplicationName"
            case sourceApplicationUrl = "SourceApplicationUrl"
            case sourceType = "SourceType"
        }
    }

    public struct CreateIntegrationAssociationResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) for the association.
        public let integrationAssociationArn: String?
        /// The identifier for the association.
        public let integrationAssociationId: String?

        public init(integrationAssociationArn: String? = nil, integrationAssociationId: String? = nil) {
            self.integrationAssociationArn = integrationAssociationArn
            self.integrationAssociationId = integrationAssociationId
        }

        private enum CodingKeys: String, CodingKey {
            case integrationAssociationArn = "IntegrationAssociationArn"
            case integrationAssociationId = "IntegrationAssociationId"
        }
    }

    public struct CreateQueueRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The description of the queue.
        public let description: String?
        /// The identifier for the hours of operation.
        public let hoursOfOperationId: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of contacts that can be in the queue before it is considered full.
        public let maxContacts: Int?
        /// The name of the queue.
        public let name: String
        /// The outbound caller ID name, number, and outbound whisper flow.
        public let outboundCallerConfig: OutboundCallerConfig?
        /// The quick connects available to agents who are working the queue.
        public let quickConnectIds: [String]?
        /// One or more tags.
        public let tags: [String: String]?

        public init(description: String? = nil, hoursOfOperationId: String, instanceId: String, maxContacts: Int? = nil, name: String, outboundCallerConfig: OutboundCallerConfig? = nil, quickConnectIds: [String]? = nil, tags: [String: String]? = nil) {
            self.description = description
            self.hoursOfOperationId = hoursOfOperationId
            self.instanceId = instanceId
            self.maxContacts = maxContacts
            self.name = name
            self.outboundCallerConfig = outboundCallerConfig
            self.quickConnectIds = quickConnectIds
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 250)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxContacts, name: "maxContacts", parent: name, min: 0)
            try self.validate(self.name, name: "name", parent: name, max: 127)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.outboundCallerConfig?.validate(name: "\(name).outboundCallerConfig")
            try self.validate(self.quickConnectIds, name: "quickConnectIds", parent: name, max: 50)
            try self.validate(self.quickConnectIds, name: "quickConnectIds", parent: name, min: 1)
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case hoursOfOperationId = "HoursOfOperationId"
            case maxContacts = "MaxContacts"
            case name = "Name"
            case outboundCallerConfig = "OutboundCallerConfig"
            case quickConnectIds = "QuickConnectIds"
            case tags = "Tags"
        }
    }

    public struct CreateQueueResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the queue.
        public let queueArn: String?
        /// The identifier for the queue.
        public let queueId: String?

        public init(queueArn: String? = nil, queueId: String? = nil) {
            self.queueArn = queueArn
            self.queueId = queueId
        }

        private enum CodingKeys: String, CodingKey {
            case queueArn = "QueueArn"
            case queueId = "QueueId"
        }
    }

    public struct CreateQuickConnectRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The description of the quick connect.
        public let description: String?
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The name of the quick connect.
        public let name: String
        /// Configuration settings for the quick connect.
        public let quickConnectConfig: QuickConnectConfig
        /// One or more tags.
        public let tags: [String: String]?

        public init(description: String? = nil, instanceId: String, name: String, quickConnectConfig: QuickConnectConfig, tags: [String: String]? = nil) {
            self.description = description
            self.instanceId = instanceId
            self.name = name
            self.quickConnectConfig = quickConnectConfig
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 250)
            try self.validate(self.description, name: "description", parent: name, min: 0)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 127)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.quickConnectConfig.validate(name: "\(name).quickConnectConfig")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case name = "Name"
            case quickConnectConfig = "QuickConnectConfig"
            case tags = "Tags"
        }
    }

    public struct CreateQuickConnectResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) for the quick connect.
        public let quickConnectARN: String?
        /// The identifier for the quick connect.
        public let quickConnectId: String?

        public init(quickConnectARN: String? = nil, quickConnectId: String? = nil) {
            self.quickConnectARN = quickConnectARN
            self.quickConnectId = quickConnectId
        }

        private enum CodingKeys: String, CodingKey {
            case quickConnectARN = "QuickConnectARN"
            case quickConnectId = "QuickConnectId"
        }
    }

    public struct CreateRoutingProfileRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The default outbound queue for the routing profile.
        public let defaultOutboundQueueId: String
        /// Description of the routing profile. Must not be more than 250 characters.
        public let description: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The channels that agents can handle in the Contact Control Panel (CCP) for this routing profile.
        public let mediaConcurrencies: [MediaConcurrency]
        /// The name of the routing profile. Must not be more than 127 characters.
        public let name: String
        /// The inbound queues associated with the routing profile. If no queue is added, the agent can make only outbound calls.
        public let queueConfigs: [RoutingProfileQueueConfig]?
        /// One or more tags.
        public let tags: [String: String]?

        public init(defaultOutboundQueueId: String, description: String, instanceId: String, mediaConcurrencies: [MediaConcurrency], name: String, queueConfigs: [RoutingProfileQueueConfig]? = nil, tags: [String: String]? = nil) {
            self.defaultOutboundQueueId = defaultOutboundQueueId
            self.description = description
            self.instanceId = instanceId
            self.mediaConcurrencies = mediaConcurrencies
            self.name = name
            self.queueConfigs = queueConfigs
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 250)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.mediaConcurrencies.forEach {
                try $0.validate(name: "\(name).mediaConcurrencies[]")
            }
            try self.validate(self.name, name: "name", parent: name, max: 127)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.queueConfigs?.forEach {
                try $0.validate(name: "\(name).queueConfigs[]")
            }
            try self.validate(self.queueConfigs, name: "queueConfigs", parent: name, max: 10)
            try self.validate(self.queueConfigs, name: "queueConfigs", parent: name, min: 1)
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case defaultOutboundQueueId = "DefaultOutboundQueueId"
            case description = "Description"
            case mediaConcurrencies = "MediaConcurrencies"
            case name = "Name"
            case queueConfigs = "QueueConfigs"
            case tags = "Tags"
        }
    }

    public struct CreateRoutingProfileResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the routing profile.
        public let routingProfileArn: String?
        /// The identifier of the routing profile.
        public let routingProfileId: String?

        public init(routingProfileArn: String? = nil, routingProfileId: String? = nil) {
            self.routingProfileArn = routingProfileArn
            self.routingProfileId = routingProfileId
        }

        private enum CodingKeys: String, CodingKey {
            case routingProfileArn = "RoutingProfileArn"
            case routingProfileId = "RoutingProfileId"
        }
    }

    public struct CreateUseCaseRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "integrationAssociationId", location: .uri(locationName: "IntegrationAssociationId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The identifier for the AppIntegration association.
        public let integrationAssociationId: String
        /// The type of use case to associate to the AppIntegration association. Each AppIntegration association can have only one of each use case type.
        public let useCaseType: UseCaseType

        public init(instanceId: String, integrationAssociationId: String, useCaseType: UseCaseType) {
            self.instanceId = instanceId
            self.integrationAssociationId = integrationAssociationId
            self.useCaseType = useCaseType
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.integrationAssociationId, name: "integrationAssociationId", parent: name, max: 200)
            try self.validate(self.integrationAssociationId, name: "integrationAssociationId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case useCaseType = "UseCaseType"
        }
    }

    public struct CreateUseCaseResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) for the use case.
        public let useCaseArn: String?
        /// The identifier of the use case.
        public let useCaseId: String?

        public init(useCaseArn: String? = nil, useCaseId: String? = nil) {
            self.useCaseArn = useCaseArn
            self.useCaseId = useCaseId
        }

        private enum CodingKeys: String, CodingKey {
            case useCaseArn = "UseCaseArn"
            case useCaseId = "UseCaseId"
        }
    }

    public struct CreateUserHierarchyGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The name of the user hierarchy group. Must not be more than 100 characters.
        public let name: String
        /// The identifier for the parent hierarchy group. The user hierarchy is created at level one if the parent group ID is null.
        public let parentGroupId: String?

        public init(instanceId: String, name: String, parentGroupId: String? = nil) {
            self.instanceId = instanceId
            self.name = name
            self.parentGroupId = parentGroupId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case parentGroupId = "ParentGroupId"
        }
    }

    public struct CreateUserHierarchyGroupResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the hierarchy group.
        public let hierarchyGroupArn: String?
        /// The identifier of the hierarchy group.
        public let hierarchyGroupId: String?

        public init(hierarchyGroupArn: String? = nil, hierarchyGroupId: String? = nil) {
            self.hierarchyGroupArn = hierarchyGroupArn
            self.hierarchyGroupId = hierarchyGroupId
        }

        private enum CodingKeys: String, CodingKey {
            case hierarchyGroupArn = "HierarchyGroupArn"
            case hierarchyGroupId = "HierarchyGroupId"
        }
    }

    public struct CreateUserRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The identifier of the user account in the directory used for identity management. If Amazon Connect cannot access the directory, you can specify this identifier to authenticate users. If you include the identifier, we assume that Amazon Connect cannot access the directory. Otherwise, the identity information is used to authenticate users from your directory. This parameter is required if you are using an existing directory for identity management in Amazon Connect when Amazon Connect cannot access your directory to authenticate users. If you are using SAML for identity management and include this parameter, an error is returned.
        public let directoryUserId: String?
        /// The identifier of the hierarchy group for the user.
        public let hierarchyGroupId: String?
        /// The information about the identity of the user.
        public let identityInfo: UserIdentityInfo?
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The password for the user account. A password is required if you are using Amazon Connect for identity management. Otherwise, it is an error to include a password.
        public let password: String?
        /// The phone settings for the user.
        public let phoneConfig: UserPhoneConfig
        /// The identifier of the routing profile for the user.
        public let routingProfileId: String
        /// The identifier of the security profile for the user.
        public let securityProfileIds: [String]
        /// One or more tags.
        public let tags: [String: String]?
        /// The user name for the account. For instances not using SAML for identity management, the user name can include up to 20 characters. If you are using SAML for identity management, the user name can include up to 64 characters from [a-zA-Z0-9_-.\@]+.
        public let username: String

        public init(directoryUserId: String? = nil, hierarchyGroupId: String? = nil, identityInfo: UserIdentityInfo? = nil, instanceId: String, password: String? = nil, phoneConfig: UserPhoneConfig, routingProfileId: String, securityProfileIds: [String], tags: [String: String]? = nil, username: String) {
            self.directoryUserId = directoryUserId
            self.hierarchyGroupId = hierarchyGroupId
            self.identityInfo = identityInfo
            self.instanceId = instanceId
            self.password = password
            self.phoneConfig = phoneConfig
            self.routingProfileId = routingProfileId
            self.securityProfileIds = securityProfileIds
            self.tags = tags
            self.username = username
        }

        public func validate(name: String) throws {
            try self.identityInfo?.validate(name: "\(name).identityInfo")
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.password, name: "password", parent: name, pattern: "/^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)[a-zA-Z\\d\\S]{8,64}$/")
            try self.phoneConfig.validate(name: "\(name).phoneConfig")
            try self.validate(self.securityProfileIds, name: "securityProfileIds", parent: name, max: 10)
            try self.validate(self.securityProfileIds, name: "securityProfileIds", parent: name, min: 1)
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
            }
            try self.validate(self.username, name: "username", parent: name, max: 100)
            try self.validate(self.username, name: "username", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case directoryUserId = "DirectoryUserId"
            case hierarchyGroupId = "HierarchyGroupId"
            case identityInfo = "IdentityInfo"
            case password = "Password"
            case phoneConfig = "PhoneConfig"
            case routingProfileId = "RoutingProfileId"
            case securityProfileIds = "SecurityProfileIds"
            case tags = "Tags"
            case username = "Username"
        }
    }

    public struct CreateUserResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the user account.
        public let userArn: String?
        /// The identifier of the user account.
        public let userId: String?

        public init(userArn: String? = nil, userId: String? = nil) {
            self.userArn = userArn
            self.userId = userId
        }

        private enum CodingKeys: String, CodingKey {
            case userArn = "UserArn"
            case userId = "UserId"
        }
    }

    public struct Credentials: AWSDecodableShape {
        /// An access token generated for a federated user to access Amazon Connect.
        public let accessToken: String?
        /// A token generated with an expiration time for the session a user is logged in to Amazon Connect.
        public let accessTokenExpiration: Date?
        /// Renews a token generated for a user to access the Amazon Connect instance.
        public let refreshToken: String?
        /// Renews the expiration timer for a generated token.
        public let refreshTokenExpiration: Date?

        public init(accessToken: String? = nil, accessTokenExpiration: Date? = nil, refreshToken: String? = nil, refreshTokenExpiration: Date? = nil) {
            self.accessToken = accessToken
            self.accessTokenExpiration = accessTokenExpiration
            self.refreshToken = refreshToken
            self.refreshTokenExpiration = refreshTokenExpiration
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case accessTokenExpiration = "AccessTokenExpiration"
            case refreshToken = "RefreshToken"
            case refreshTokenExpiration = "RefreshTokenExpiration"
        }
    }

    public struct CurrentMetric: AWSEncodableShape & AWSDecodableShape {
        /// The name of the metric.
        public let name: CurrentMetricName?
        /// The unit for the metric.
        public let unit: Unit?

        public init(name: CurrentMetricName? = nil, unit: Unit? = nil) {
            self.name = name
            self.unit = unit
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case unit = "Unit"
        }
    }

    public struct CurrentMetricData: AWSDecodableShape {
        /// Information about the metric.
        public let metric: CurrentMetric?
        /// The value of the metric.
        public let value: Double?

        public init(metric: CurrentMetric? = nil, value: Double? = nil) {
            self.metric = metric
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case metric = "Metric"
            case value = "Value"
        }
    }

    public struct CurrentMetricResult: AWSDecodableShape {
        /// The set of metrics.
        public let collections: [CurrentMetricData]?
        /// The dimensions for the metrics.
        public let dimensions: Dimensions?

        public init(collections: [CurrentMetricData]? = nil, dimensions: Dimensions? = nil) {
            self.collections = collections
            self.dimensions = dimensions
        }

        private enum CodingKeys: String, CodingKey {
            case collections = "Collections"
            case dimensions = "Dimensions"
        }
    }

    public struct DeleteInstanceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String

        public init(instanceId: String) {
            self.instanceId = instanceId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteIntegrationAssociationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "integrationAssociationId", location: .uri(locationName: "IntegrationAssociationId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The identifier for the AppIntegration association.
        public let integrationAssociationId: String

        public init(instanceId: String, integrationAssociationId: String) {
            self.instanceId = instanceId
            self.integrationAssociationId = integrationAssociationId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.integrationAssociationId, name: "integrationAssociationId", parent: name, max: 200)
            try self.validate(self.integrationAssociationId, name: "integrationAssociationId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteQuickConnectRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "quickConnectId", location: .uri(locationName: "QuickConnectId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The identifier for the quick connect.
        public let quickConnectId: String

        public init(instanceId: String, quickConnectId: String) {
            self.instanceId = instanceId
            self.quickConnectId = quickConnectId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteUseCaseRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "integrationAssociationId", location: .uri(locationName: "IntegrationAssociationId")),
            AWSMemberEncoding(label: "useCaseId", location: .uri(locationName: "UseCaseId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The identifier for the AppIntegration association.
        public let integrationAssociationId: String
        /// The identifier for the use case.
        public let useCaseId: String

        public init(instanceId: String, integrationAssociationId: String, useCaseId: String) {
            self.instanceId = instanceId
            self.integrationAssociationId = integrationAssociationId
            self.useCaseId = useCaseId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.integrationAssociationId, name: "integrationAssociationId", parent: name, max: 200)
            try self.validate(self.integrationAssociationId, name: "integrationAssociationId", parent: name, min: 1)
            try self.validate(self.useCaseId, name: "useCaseId", parent: name, max: 200)
            try self.validate(self.useCaseId, name: "useCaseId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteUserHierarchyGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "hierarchyGroupId", location: .uri(locationName: "HierarchyGroupId")),
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The identifier of the hierarchy group.
        public let hierarchyGroupId: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String

        public init(hierarchyGroupId: String, instanceId: String) {
            self.hierarchyGroupId = hierarchyGroupId
            self.instanceId = instanceId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteUserRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "userId", location: .uri(locationName: "UserId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The identifier of the user.
        public let userId: String

        public init(instanceId: String, userId: String) {
            self.instanceId = instanceId
            self.userId = userId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeContactFlowRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "contactFlowId", location: .uri(locationName: "ContactFlowId")),
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The identifier of the contact flow.
        public let contactFlowId: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String

        public init(contactFlowId: String, instanceId: String) {
            self.contactFlowId = contactFlowId
            self.instanceId = instanceId
        }

        public func validate(name: String) throws {
            try self.validate(self.contactFlowId, name: "contactFlowId", parent: name, max: 500)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeContactFlowResponse: AWSDecodableShape {
        /// Information about the contact flow.
        public let contactFlow: ContactFlow?

        public init(contactFlow: ContactFlow? = nil) {
            self.contactFlow = contactFlow
        }

        private enum CodingKeys: String, CodingKey {
            case contactFlow = "ContactFlow"
        }
    }

    public struct DescribeHoursOfOperationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "hoursOfOperationId", location: .uri(locationName: "HoursOfOperationId")),
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The identifier for the hours of operation.
        public let hoursOfOperationId: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String

        public init(hoursOfOperationId: String, instanceId: String) {
            self.hoursOfOperationId = hoursOfOperationId
            self.instanceId = instanceId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeHoursOfOperationResponse: AWSDecodableShape {
        /// The hours of operation.
        public let hoursOfOperation: HoursOfOperation?

        public init(hoursOfOperation: HoursOfOperation? = nil) {
            self.hoursOfOperation = hoursOfOperation
        }

        private enum CodingKeys: String, CodingKey {
            case hoursOfOperation = "HoursOfOperation"
        }
    }

    public struct DescribeInstanceAttributeRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "attributeType", location: .uri(locationName: "AttributeType")),
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The type of attribute.
        public let attributeType: InstanceAttributeType
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String

        public init(attributeType: InstanceAttributeType, instanceId: String) {
            self.attributeType = attributeType
            self.instanceId = instanceId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeInstanceAttributeResponse: AWSDecodableShape {
        /// The type of attribute.
        public let attribute: Attribute?

        public init(attribute: Attribute? = nil) {
            self.attribute = attribute
        }

        private enum CodingKeys: String, CodingKey {
            case attribute = "Attribute"
        }
    }

    public struct DescribeInstanceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String

        public init(instanceId: String) {
            self.instanceId = instanceId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeInstanceResponse: AWSDecodableShape {
        /// The name of the instance.
        public let instance: Instance?

        public init(instance: Instance? = nil) {
            self.instance = instance
        }

        private enum CodingKeys: String, CodingKey {
            case instance = "Instance"
        }
    }

    public struct DescribeInstanceStorageConfigRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "associationId", location: .uri(locationName: "AssociationId")),
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "resourceType", location: .querystring(locationName: "resourceType"))
        ]

        /// The existing association identifier that uniquely identifies the resource type and storage config for the given instance ID.
        public let associationId: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// A valid resource type.
        public let resourceType: InstanceStorageResourceType

        public init(associationId: String, instanceId: String, resourceType: InstanceStorageResourceType) {
            self.associationId = associationId
            self.instanceId = instanceId
            self.resourceType = resourceType
        }

        public func validate(name: String) throws {
            try self.validate(self.associationId, name: "associationId", parent: name, max: 100)
            try self.validate(self.associationId, name: "associationId", parent: name, min: 1)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeInstanceStorageConfigResponse: AWSDecodableShape {
        /// A valid storage type.
        public let storageConfig: InstanceStorageConfig?

        public init(storageConfig: InstanceStorageConfig? = nil) {
            self.storageConfig = storageConfig
        }

        private enum CodingKeys: String, CodingKey {
            case storageConfig = "StorageConfig"
        }
    }

    public struct DescribeQueueRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "queueId", location: .uri(locationName: "QueueId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The identifier for the queue.
        public let queueId: String

        public init(instanceId: String, queueId: String) {
            self.instanceId = instanceId
            self.queueId = queueId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeQueueResponse: AWSDecodableShape {
        /// The name of the queue.
        public let queue: Queue?

        public init(queue: Queue? = nil) {
            self.queue = queue
        }

        private enum CodingKeys: String, CodingKey {
            case queue = "Queue"
        }
    }

    public struct DescribeQuickConnectRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "quickConnectId", location: .uri(locationName: "QuickConnectId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The identifier for the quick connect.
        public let quickConnectId: String

        public init(instanceId: String, quickConnectId: String) {
            self.instanceId = instanceId
            self.quickConnectId = quickConnectId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeQuickConnectResponse: AWSDecodableShape {
        /// Information about the quick connect.
        public let quickConnect: QuickConnect?

        public init(quickConnect: QuickConnect? = nil) {
            self.quickConnect = quickConnect
        }

        private enum CodingKeys: String, CodingKey {
            case quickConnect = "QuickConnect"
        }
    }

    public struct DescribeRoutingProfileRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "routingProfileId", location: .uri(locationName: "RoutingProfileId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The identifier of the routing profile.
        public let routingProfileId: String

        public init(instanceId: String, routingProfileId: String) {
            self.instanceId = instanceId
            self.routingProfileId = routingProfileId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeRoutingProfileResponse: AWSDecodableShape {
        /// The routing profile.
        public let routingProfile: RoutingProfile?

        public init(routingProfile: RoutingProfile? = nil) {
            self.routingProfile = routingProfile
        }

        private enum CodingKeys: String, CodingKey {
            case routingProfile = "RoutingProfile"
        }
    }

    public struct DescribeUserHierarchyGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "hierarchyGroupId", location: .uri(locationName: "HierarchyGroupId")),
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The identifier of the hierarchy group.
        public let hierarchyGroupId: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String

        public init(hierarchyGroupId: String, instanceId: String) {
            self.hierarchyGroupId = hierarchyGroupId
            self.instanceId = instanceId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeUserHierarchyGroupResponse: AWSDecodableShape {
        /// Information about the hierarchy group.
        public let hierarchyGroup: HierarchyGroup?

        public init(hierarchyGroup: HierarchyGroup? = nil) {
            self.hierarchyGroup = hierarchyGroup
        }

        private enum CodingKeys: String, CodingKey {
            case hierarchyGroup = "HierarchyGroup"
        }
    }

    public struct DescribeUserHierarchyStructureRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String

        public init(instanceId: String) {
            self.instanceId = instanceId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeUserHierarchyStructureResponse: AWSDecodableShape {
        /// Information about the hierarchy structure.
        public let hierarchyStructure: HierarchyStructure?

        public init(hierarchyStructure: HierarchyStructure? = nil) {
            self.hierarchyStructure = hierarchyStructure
        }

        private enum CodingKeys: String, CodingKey {
            case hierarchyStructure = "HierarchyStructure"
        }
    }

    public struct DescribeUserRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "userId", location: .uri(locationName: "UserId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The identifier of the user account.
        public let userId: String

        public init(instanceId: String, userId: String) {
            self.instanceId = instanceId
            self.userId = userId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeUserResponse: AWSDecodableShape {
        /// Information about the user account and configuration settings.
        public let user: User?

        public init(user: User? = nil) {
            self.user = user
        }

        private enum CodingKeys: String, CodingKey {
            case user = "User"
        }
    }

    public struct Dimensions: AWSDecodableShape {
        /// The channel used for grouping and filters.
        public let channel: Channel?
        /// Information about the queue for which metrics are returned.
        public let queue: QueueReference?

        public init(channel: Channel? = nil, queue: QueueReference? = nil) {
            self.channel = channel
            self.queue = queue
        }

        private enum CodingKeys: String, CodingKey {
            case channel = "Channel"
            case queue = "Queue"
        }
    }

    public struct DisassociateApprovedOriginRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "origin", location: .querystring(locationName: "origin"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The domain URL of the integrated application.
        public let origin: String

        public init(instanceId: String, origin: String) {
            self.instanceId = instanceId
            self.origin = origin
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.origin, name: "origin", parent: name, max: 267)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DisassociateInstanceStorageConfigRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "associationId", location: .uri(locationName: "AssociationId")),
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "resourceType", location: .querystring(locationName: "resourceType"))
        ]

        /// The existing association identifier that uniquely identifies the resource type and storage config for the given instance ID.
        public let associationId: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// A valid resource type.
        public let resourceType: InstanceStorageResourceType

        public init(associationId: String, instanceId: String, resourceType: InstanceStorageResourceType) {
            self.associationId = associationId
            self.instanceId = instanceId
            self.resourceType = resourceType
        }

        public func validate(name: String) throws {
            try self.validate(self.associationId, name: "associationId", parent: name, max: 100)
            try self.validate(self.associationId, name: "associationId", parent: name, min: 1)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DisassociateLambdaFunctionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "functionArn", location: .querystring(locationName: "functionArn")),
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The Amazon Resource Name (ARN) of the Lambda function being disassociated.
        public let functionArn: String
        /// The identifier of the Amazon Connect instance..
        public let instanceId: String

        public init(functionArn: String, instanceId: String) {
            self.functionArn = functionArn
            self.instanceId = instanceId
        }

        public func validate(name: String) throws {
            try self.validate(self.functionArn, name: "functionArn", parent: name, max: 140)
            try self.validate(self.functionArn, name: "functionArn", parent: name, min: 1)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DisassociateLexBotRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botName", location: .querystring(locationName: "botName")),
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "lexRegion", location: .querystring(locationName: "lexRegion"))
        ]

        /// The name of the Amazon Lex bot. Maximum character limit of 50.
        public let botName: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The Region in which the Amazon Lex bot has been created.
        public let lexRegion: String

        public init(botName: String, instanceId: String, lexRegion: String) {
            self.botName = botName
            self.instanceId = instanceId
            self.lexRegion = lexRegion
        }

        public func validate(name: String) throws {
            try self.validate(self.botName, name: "botName", parent: name, max: 50)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.lexRegion, name: "lexRegion", parent: name, max: 60)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DisassociateQueueQuickConnectsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "queueId", location: .uri(locationName: "QueueId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The identifier for the queue.
        public let queueId: String
        /// The quick connects to disassociate from the queue.
        public let quickConnectIds: [String]

        public init(instanceId: String, queueId: String, quickConnectIds: [String]) {
            self.instanceId = instanceId
            self.queueId = queueId
            self.quickConnectIds = quickConnectIds
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.quickConnectIds, name: "quickConnectIds", parent: name, max: 50)
            try self.validate(self.quickConnectIds, name: "quickConnectIds", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case quickConnectIds = "QuickConnectIds"
        }
    }

    public struct DisassociateRoutingProfileQueuesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "routingProfileId", location: .uri(locationName: "RoutingProfileId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The queues to disassociate from this routing profile.
        public let queueReferences: [RoutingProfileQueueReference]
        /// The identifier of the routing profile.
        public let routingProfileId: String

        public init(instanceId: String, queueReferences: [RoutingProfileQueueReference], routingProfileId: String) {
            self.instanceId = instanceId
            self.queueReferences = queueReferences
            self.routingProfileId = routingProfileId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case queueReferences = "QueueReferences"
        }
    }

    public struct DisassociateSecurityKeyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "associationId", location: .uri(locationName: "AssociationId")),
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The existing association identifier that uniquely identifies the resource type and storage config for the given instance ID.
        public let associationId: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String

        public init(associationId: String, instanceId: String) {
            self.associationId = associationId
            self.instanceId = instanceId
        }

        public func validate(name: String) throws {
            try self.validate(self.associationId, name: "associationId", parent: name, max: 100)
            try self.validate(self.associationId, name: "associationId", parent: name, min: 1)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct EncryptionConfig: AWSEncodableShape & AWSDecodableShape {
        /// The type of encryption.
        public let encryptionType: EncryptionType
        /// The identifier of the encryption key.
        public let keyId: String

        public init(encryptionType: EncryptionType, keyId: String) {
            self.encryptionType = encryptionType
            self.keyId = keyId
        }

        public func validate(name: String) throws {
            try self.validate(self.keyId, name: "keyId", parent: name, max: 128)
            try self.validate(self.keyId, name: "keyId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case encryptionType = "EncryptionType"
            case keyId = "KeyId"
        }
    }

    public struct Filters: AWSEncodableShape {
        /// The channel to use to filter the metrics.
        public let channels: [Channel]?
        /// The queues to use to filter the metrics. You can specify up to 100 queues per request.
        public let queues: [String]?

        public init(channels: [Channel]? = nil, queues: [String]? = nil) {
            self.channels = channels
            self.queues = queues
        }

        public func validate(name: String) throws {
            try self.validate(self.channels, name: "channels", parent: name, max: 1)
            try self.validate(self.queues, name: "queues", parent: name, max: 100)
            try self.validate(self.queues, name: "queues", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case channels = "Channels"
            case queues = "Queues"
        }
    }

    public struct GetContactAttributesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "initialContactId", location: .uri(locationName: "InitialContactId")),
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The identifier of the initial contact.
        public let initialContactId: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String

        public init(initialContactId: String, instanceId: String) {
            self.initialContactId = initialContactId
            self.instanceId = instanceId
        }

        public func validate(name: String) throws {
            try self.validate(self.initialContactId, name: "initialContactId", parent: name, max: 256)
            try self.validate(self.initialContactId, name: "initialContactId", parent: name, min: 1)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetContactAttributesResponse: AWSDecodableShape {
        /// Information about the attributes.
        public let attributes: [String: String]?

        public init(attributes: [String: String]? = nil) {
            self.attributes = attributes
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
        }
    }

    public struct GetCurrentMetricDataRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The metrics to retrieve. Specify the name and unit for each metric. The following metrics are available. For a description of all the metrics, see Real-time Metrics Definitions in the Amazon Connect Administrator Guide.  AGENTS_AFTER_CONTACT_WORK  Unit: COUNT Name in real-time metrics report: ACW   AGENTS_AVAILABLE  Unit: COUNT Name in real-time metrics report: Available   AGENTS_ERROR  Unit: COUNT Name in real-time metrics report: Error   AGENTS_NON_PRODUCTIVE  Unit: COUNT Name in real-time metrics report: NPT (Non-Productive Time)   AGENTS_ON_CALL  Unit: COUNT Name in real-time metrics report: On contact   AGENTS_ON_CONTACT  Unit: COUNT Name in real-time metrics report: On contact   AGENTS_ONLINE  Unit: COUNT Name in real-time metrics report: Online   AGENTS_STAFFED  Unit: COUNT Name in real-time metrics report: Staffed   CONTACTS_IN_QUEUE  Unit: COUNT Name in real-time metrics report: In queue   CONTACTS_SCHEDULED  Unit: COUNT Name in real-time metrics report: Scheduled   OLDEST_CONTACT_AGE  Unit: SECONDS When you use groupings, Unit says SECONDS but the Value is returned in MILLISECONDS. For example, if you get a response like this:  { "Metric": { "Name": "OLDEST_CONTACT_AGE", "Unit": "SECONDS" }, "Value": 24113.0 } The actual OLDEST_CONTACT_AGE is 24 seconds. Name in real-time metrics report: Oldest   SLOTS_ACTIVE  Unit: COUNT Name in real-time metrics report: Active   SLOTS_AVAILABLE  Unit: COUNT Name in real-time metrics report: Availability
        public let currentMetrics: [CurrentMetric]
        /// The queues, up to 100, or channels, to use to filter the metrics returned. Metric data is retrieved only for the resources associated with the queues or channels included in the filter. You can include both queue IDs and queue ARNs in the same request. VOICE, CHAT, and TASK channels are supported.
        public let filters: Filters
        /// The grouping applied to the metrics returned. For example, when grouped by QUEUE, the metrics returned apply to each queue rather than aggregated for all queues. If you group by CHANNEL, you should include a Channels filter. VOICE, CHAT, and TASK channels are supported. If no Grouping is included in the request, a summary of metrics is returned.
        public let groupings: [Grouping]?
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. The token expires after 5 minutes from the time it is created. Subsequent requests that use the token must use the same request parameters as the request that generated the token.
        public let nextToken: String?

        public init(currentMetrics: [CurrentMetric], filters: Filters, groupings: [Grouping]? = nil, instanceId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.currentMetrics = currentMetrics
            self.filters = filters
            self.groupings = groupings
            self.instanceId = instanceId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filters.validate(name: "\(name).filters")
            try self.validate(self.groupings, name: "groupings", parent: name, max: 2)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case currentMetrics = "CurrentMetrics"
            case filters = "Filters"
            case groupings = "Groupings"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct GetCurrentMetricDataResponse: AWSDecodableShape {
        /// The time at which the metrics were retrieved and cached for pagination.
        public let dataSnapshotTime: Date?
        /// Information about the real-time metrics.
        public let metricResults: [CurrentMetricResult]?
        /// If there are additional results, this is the token for the next set of results. The token expires after 5 minutes from the time it is created. Subsequent requests that use the token must use the same request parameters as the request that generated the token.
        public let nextToken: String?

        public init(dataSnapshotTime: Date? = nil, metricResults: [CurrentMetricResult]? = nil, nextToken: String? = nil) {
            self.dataSnapshotTime = dataSnapshotTime
            self.metricResults = metricResults
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case dataSnapshotTime = "DataSnapshotTime"
            case metricResults = "MetricResults"
            case nextToken = "NextToken"
        }
    }

    public struct GetFederationTokenRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String

        public init(instanceId: String) {
            self.instanceId = instanceId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetFederationTokenResponse: AWSDecodableShape {
        /// The credentials to use for federation.
        public let credentials: Credentials?

        public init(credentials: Credentials? = nil) {
            self.credentials = credentials
        }

        private enum CodingKeys: String, CodingKey {
            case credentials = "Credentials"
        }
    }

    public struct GetMetricDataRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The timestamp, in UNIX Epoch time format, at which to end the reporting interval for the retrieval of historical metrics data. The time must be specified using an interval of 5 minutes, such as 11:00, 11:05, 11:10, and must be later than the start time timestamp. The time range between the start and end time must be less than 24 hours.
        public let endTime: Date
        /// The queues, up to 100, or channels, to use to filter the metrics returned. Metric data is retrieved only for the resources associated with the queues or channels included in the filter. You can include both queue IDs and queue ARNs in the same request. VOICE, CHAT, and TASK channels are supported.
        public let filters: Filters
        /// The grouping applied to the metrics returned. For example, when results are grouped by queue, the metrics returned are grouped by queue. The values returned apply to the metrics for each queue rather than aggregated for all queues. The only supported grouping is QUEUE. If no grouping is specified, a summary of metrics for all queues is returned.
        public let groupings: [Grouping]?
        /// The metrics to retrieve. Specify the name, unit, and statistic for each metric. The following historical metrics are available. For a description of each metric, see Historical Metrics Definitions in the Amazon Connect Administrator Guide.  ABANDON_TIME  Unit: SECONDS Statistic: AVG  AFTER_CONTACT_WORK_TIME  Unit: SECONDS Statistic: AVG  API_CONTACTS_HANDLED  Unit: COUNT Statistic: SUM  CALLBACK_CONTACTS_HANDLED  Unit: COUNT Statistic: SUM  CONTACTS_ABANDONED  Unit: COUNT Statistic: SUM  CONTACTS_AGENT_HUNG_UP_FIRST  Unit: COUNT Statistic: SUM  CONTACTS_CONSULTED  Unit: COUNT Statistic: SUM  CONTACTS_HANDLED  Unit: COUNT Statistic: SUM  CONTACTS_HANDLED_INCOMING  Unit: COUNT Statistic: SUM  CONTACTS_HANDLED_OUTBOUND  Unit: COUNT Statistic: SUM  CONTACTS_HOLD_ABANDONS  Unit: COUNT Statistic: SUM  CONTACTS_MISSED  Unit: COUNT Statistic: SUM  CONTACTS_QUEUED  Unit: COUNT Statistic: SUM  CONTACTS_TRANSFERRED_IN  Unit: COUNT Statistic: SUM  CONTACTS_TRANSFERRED_IN_FROM_QUEUE  Unit: COUNT Statistic: SUM  CONTACTS_TRANSFERRED_OUT  Unit: COUNT Statistic: SUM  CONTACTS_TRANSFERRED_OUT_FROM_QUEUE  Unit: COUNT Statistic: SUM  HANDLE_TIME  Unit: SECONDS Statistic: AVG  HOLD_TIME  Unit: SECONDS Statistic: AVG  INTERACTION_AND_HOLD_TIME  Unit: SECONDS Statistic: AVG  INTERACTION_TIME  Unit: SECONDS Statistic: AVG  OCCUPANCY  Unit: PERCENT Statistic: AVG  QUEUE_ANSWER_TIME  Unit: SECONDS Statistic: AVG  QUEUED_TIME  Unit: SECONDS Statistic: MAX  SERVICE_LEVEL  Unit: PERCENT Statistic: AVG Threshold: Only "Less than" comparisons are supported, with the following service level thresholds: 15, 20, 25, 30, 45, 60, 90, 120, 180, 240, 300, 600
        public let historicalMetrics: [HistoricalMetric]
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
        public let nextToken: String?
        /// The timestamp, in UNIX Epoch time format, at which to start the reporting interval for the retrieval of historical metrics data. The time must be specified using a multiple of 5 minutes, such as 10:05, 10:10, 10:15. The start time cannot be earlier than 24 hours before the time of the request. Historical metrics are available only for 24 hours.
        public let startTime: Date

        public init(endTime: Date, filters: Filters, groupings: [Grouping]? = nil, historicalMetrics: [HistoricalMetric], instanceId: String, maxResults: Int? = nil, nextToken: String? = nil, startTime: Date) {
            self.endTime = endTime
            self.filters = filters
            self.groupings = groupings
            self.historicalMetrics = historicalMetrics
            self.instanceId = instanceId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.startTime = startTime
        }

        public func validate(name: String) throws {
            try self.filters.validate(name: "\(name).filters")
            try self.validate(self.groupings, name: "groupings", parent: name, max: 2)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case endTime = "EndTime"
            case filters = "Filters"
            case groupings = "Groupings"
            case historicalMetrics = "HistoricalMetrics"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case startTime = "StartTime"
        }
    }

    public struct GetMetricDataResponse: AWSDecodableShape {
        /// Information about the historical metrics. If no grouping is specified, a summary of metric data is returned.
        public let metricResults: [HistoricalMetricResult]?
        /// If there are additional results, this is the token for the next set of results. The token expires after 5 minutes from the time it is created. Subsequent requests that use the token must use the same request parameters as the request that generated the token.
        public let nextToken: String?

        public init(metricResults: [HistoricalMetricResult]? = nil, nextToken: String? = nil) {
            self.metricResults = metricResults
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case metricResults = "MetricResults"
            case nextToken = "NextToken"
        }
    }

    public struct HierarchyGroup: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the hierarchy group.
        public let arn: String?
        /// Information about the levels in the hierarchy group.
        public let hierarchyPath: HierarchyPath?
        /// The identifier of the hierarchy group.
        public let id: String?
        /// The identifier of the level in the hierarchy group.
        public let levelId: String?
        /// The name of the hierarchy group.
        public let name: String?

        public init(arn: String? = nil, hierarchyPath: HierarchyPath? = nil, id: String? = nil, levelId: String? = nil, name: String? = nil) {
            self.arn = arn
            self.hierarchyPath = hierarchyPath
            self.id = id
            self.levelId = levelId
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case hierarchyPath = "HierarchyPath"
            case id = "Id"
            case levelId = "LevelId"
            case name = "Name"
        }
    }

    public struct HierarchyGroupSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the hierarchy group.
        public let arn: String?
        /// The identifier of the hierarchy group.
        public let id: String?
        /// The name of the hierarchy group.
        public let name: String?

        public init(arn: String? = nil, id: String? = nil, name: String? = nil) {
            self.arn = arn
            self.id = id
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case id = "Id"
            case name = "Name"
        }
    }

    public struct HierarchyLevel: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the hierarchy level.
        public let arn: String?
        /// The identifier of the hierarchy level.
        public let id: String?
        /// The name of the hierarchy level.
        public let name: String?

        public init(arn: String? = nil, id: String? = nil, name: String? = nil) {
            self.arn = arn
            self.id = id
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case id = "Id"
            case name = "Name"
        }
    }

    public struct HierarchyLevelUpdate: AWSEncodableShape {
        /// The name of the user hierarchy level. Must not be more than 50 characters.
        public let name: String

        public init(name: String) {
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct HierarchyPath: AWSDecodableShape {
        /// Information about level five.
        public let levelFive: HierarchyGroupSummary?
        /// Information about level four.
        public let levelFour: HierarchyGroupSummary?
        /// Information about level one.
        public let levelOne: HierarchyGroupSummary?
        /// Information about level three.
        public let levelThree: HierarchyGroupSummary?
        /// Information about level two.
        public let levelTwo: HierarchyGroupSummary?

        public init(levelFive: HierarchyGroupSummary? = nil, levelFour: HierarchyGroupSummary? = nil, levelOne: HierarchyGroupSummary? = nil, levelThree: HierarchyGroupSummary? = nil, levelTwo: HierarchyGroupSummary? = nil) {
            self.levelFive = levelFive
            self.levelFour = levelFour
            self.levelOne = levelOne
            self.levelThree = levelThree
            self.levelTwo = levelTwo
        }

        private enum CodingKeys: String, CodingKey {
            case levelFive = "LevelFive"
            case levelFour = "LevelFour"
            case levelOne = "LevelOne"
            case levelThree = "LevelThree"
            case levelTwo = "LevelTwo"
        }
    }

    public struct HierarchyStructure: AWSDecodableShape {
        /// Information about level five.
        public let levelFive: HierarchyLevel?
        /// Information about level four.
        public let levelFour: HierarchyLevel?
        /// Information about level one.
        public let levelOne: HierarchyLevel?
        /// Information about level three.
        public let levelThree: HierarchyLevel?
        /// Information about level two.
        public let levelTwo: HierarchyLevel?

        public init(levelFive: HierarchyLevel? = nil, levelFour: HierarchyLevel? = nil, levelOne: HierarchyLevel? = nil, levelThree: HierarchyLevel? = nil, levelTwo: HierarchyLevel? = nil) {
            self.levelFive = levelFive
            self.levelFour = levelFour
            self.levelOne = levelOne
            self.levelThree = levelThree
            self.levelTwo = levelTwo
        }

        private enum CodingKeys: String, CodingKey {
            case levelFive = "LevelFive"
            case levelFour = "LevelFour"
            case levelOne = "LevelOne"
            case levelThree = "LevelThree"
            case levelTwo = "LevelTwo"
        }
    }

    public struct HierarchyStructureUpdate: AWSEncodableShape {
        /// The update for level five.
        public let levelFive: HierarchyLevelUpdate?
        /// The update for level four.
        public let levelFour: HierarchyLevelUpdate?
        /// The update for level one.
        public let levelOne: HierarchyLevelUpdate?
        /// The update for level three.
        public let levelThree: HierarchyLevelUpdate?
        /// The update for level two.
        public let levelTwo: HierarchyLevelUpdate?

        public init(levelFive: HierarchyLevelUpdate? = nil, levelFour: HierarchyLevelUpdate? = nil, levelOne: HierarchyLevelUpdate? = nil, levelThree: HierarchyLevelUpdate? = nil, levelTwo: HierarchyLevelUpdate? = nil) {
            self.levelFive = levelFive
            self.levelFour = levelFour
            self.levelOne = levelOne
            self.levelThree = levelThree
            self.levelTwo = levelTwo
        }

        private enum CodingKeys: String, CodingKey {
            case levelFive = "LevelFive"
            case levelFour = "LevelFour"
            case levelOne = "LevelOne"
            case levelThree = "LevelThree"
            case levelTwo = "LevelTwo"
        }
    }

    public struct HistoricalMetric: AWSEncodableShape & AWSDecodableShape {
        /// The name of the metric.
        public let name: HistoricalMetricName?
        /// The statistic for the metric.
        public let statistic: Statistic?
        /// The threshold for the metric, used with service level metrics.
        public let threshold: Threshold?
        /// The unit for the metric.
        public let unit: Unit?

        public init(name: HistoricalMetricName? = nil, statistic: Statistic? = nil, threshold: Threshold? = nil, unit: Unit? = nil) {
            self.name = name
            self.statistic = statistic
            self.threshold = threshold
            self.unit = unit
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case statistic = "Statistic"
            case threshold = "Threshold"
            case unit = "Unit"
        }
    }

    public struct HistoricalMetricData: AWSDecodableShape {
        /// Information about the metric.
        public let metric: HistoricalMetric?
        /// The value of the metric.
        public let value: Double?

        public init(metric: HistoricalMetric? = nil, value: Double? = nil) {
            self.metric = metric
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case metric = "Metric"
            case value = "Value"
        }
    }

    public struct HistoricalMetricResult: AWSDecodableShape {
        /// The set of metrics.
        public let collections: [HistoricalMetricData]?
        /// The dimension for the metrics.
        public let dimensions: Dimensions?

        public init(collections: [HistoricalMetricData]? = nil, dimensions: Dimensions? = nil) {
            self.collections = collections
            self.dimensions = dimensions
        }

        private enum CodingKeys: String, CodingKey {
            case collections = "Collections"
            case dimensions = "Dimensions"
        }
    }

    public struct HoursOfOperation: AWSDecodableShape {
        /// Configuration information for the hours of operation.
        public let config: [HoursOfOperationConfig]?
        /// The description for the hours of operation.
        public let description: String?
        /// The Amazon Resource Name (ARN) for the hours of operation.
        public let hoursOfOperationArn: String?
        /// The identifier for the hours of operation.
        public let hoursOfOperationId: String?
        /// The name for the hours of operation.
        public let name: String?
        /// One or more tags.
        public let tags: [String: String]?
        /// The time zone for the hours of operation.
        public let timeZone: String?

        public init(config: [HoursOfOperationConfig]? = nil, description: String? = nil, hoursOfOperationArn: String? = nil, hoursOfOperationId: String? = nil, name: String? = nil, tags: [String: String]? = nil, timeZone: String? = nil) {
            self.config = config
            self.description = description
            self.hoursOfOperationArn = hoursOfOperationArn
            self.hoursOfOperationId = hoursOfOperationId
            self.name = name
            self.tags = tags
            self.timeZone = timeZone
        }

        private enum CodingKeys: String, CodingKey {
            case config = "Config"
            case description = "Description"
            case hoursOfOperationArn = "HoursOfOperationArn"
            case hoursOfOperationId = "HoursOfOperationId"
            case name = "Name"
            case tags = "Tags"
            case timeZone = "TimeZone"
        }
    }

    public struct HoursOfOperationConfig: AWSDecodableShape {
        /// The day that the hours of operation applies to.
        public let day: HoursOfOperationDays?
        /// The end time that your contact center is closes.
        public let endTime: HoursOfOperationTimeSlice?
        /// The start time that your contact center is open.
        public let startTime: HoursOfOperationTimeSlice?

        public init(day: HoursOfOperationDays? = nil, endTime: HoursOfOperationTimeSlice? = nil, startTime: HoursOfOperationTimeSlice? = nil) {
            self.day = day
            self.endTime = endTime
            self.startTime = startTime
        }

        private enum CodingKeys: String, CodingKey {
            case day = "Day"
            case endTime = "EndTime"
            case startTime = "StartTime"
        }
    }

    public struct HoursOfOperationSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the hours of operation.
        public let arn: String?
        /// The identifier of the hours of operation.
        public let id: String?
        /// The name of the hours of operation.
        public let name: String?

        public init(arn: String? = nil, id: String? = nil, name: String? = nil) {
            self.arn = arn
            self.id = id
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case id = "Id"
            case name = "Name"
        }
    }

    public struct HoursOfOperationTimeSlice: AWSDecodableShape {
        /// The hours.
        public let hours: Int?
        /// The minutes.
        public let minutes: Int?

        public init(hours: Int? = nil, minutes: Int? = nil) {
            self.hours = hours
            self.minutes = minutes
        }

        private enum CodingKeys: String, CodingKey {
            case hours = "Hours"
            case minutes = "Minutes"
        }
    }

    public struct Instance: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the instance.
        public let arn: String?
        /// When the instance was created.
        public let createdTime: Date?
        /// The identifier of the Amazon Connect instance.
        public let id: String?
        /// The identity management type.
        public let identityManagementType: DirectoryType?
        /// Whether inbound calls are enabled.
        public let inboundCallsEnabled: Bool?
        /// The alias of instance.
        public let instanceAlias: String?
        /// The state of the instance.
        public let instanceStatus: InstanceStatus?
        /// Whether outbound calls are enabled.
        public let outboundCallsEnabled: Bool?
        /// The service role of the instance.
        public let serviceRole: String?
        /// Relevant details why the instance was not successfully created.
        public let statusReason: InstanceStatusReason?

        public init(arn: String? = nil, createdTime: Date? = nil, id: String? = nil, identityManagementType: DirectoryType? = nil, inboundCallsEnabled: Bool? = nil, instanceAlias: String? = nil, instanceStatus: InstanceStatus? = nil, outboundCallsEnabled: Bool? = nil, serviceRole: String? = nil, statusReason: InstanceStatusReason? = nil) {
            self.arn = arn
            self.createdTime = createdTime
            self.id = id
            self.identityManagementType = identityManagementType
            self.inboundCallsEnabled = inboundCallsEnabled
            self.instanceAlias = instanceAlias
            self.instanceStatus = instanceStatus
            self.outboundCallsEnabled = outboundCallsEnabled
            self.serviceRole = serviceRole
            self.statusReason = statusReason
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case createdTime = "CreatedTime"
            case id = "Id"
            case identityManagementType = "IdentityManagementType"
            case inboundCallsEnabled = "InboundCallsEnabled"
            case instanceAlias = "InstanceAlias"
            case instanceStatus = "InstanceStatus"
            case outboundCallsEnabled = "OutboundCallsEnabled"
            case serviceRole = "ServiceRole"
            case statusReason = "StatusReason"
        }
    }

    public struct InstanceStatusReason: AWSDecodableShape {
        /// The message.
        public let message: String?

        public init(message: String? = nil) {
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
        }
    }

    public struct InstanceStorageConfig: AWSEncodableShape & AWSDecodableShape {
        /// The existing association identifier that uniquely identifies the resource type and storage config for the given instance ID.
        public let associationId: String?
        /// The configuration of the Kinesis Firehose delivery stream.
        public let kinesisFirehoseConfig: KinesisFirehoseConfig?
        /// The configuration of the Kinesis data stream.
        public let kinesisStreamConfig: KinesisStreamConfig?
        /// The configuration of the Kinesis video stream.
        public let kinesisVideoStreamConfig: KinesisVideoStreamConfig?
        /// The S3 bucket configuration.
        public let s3Config: S3Config?
        /// A valid storage type.
        public let storageType: StorageType

        public init(associationId: String? = nil, kinesisFirehoseConfig: KinesisFirehoseConfig? = nil, kinesisStreamConfig: KinesisStreamConfig? = nil, kinesisVideoStreamConfig: KinesisVideoStreamConfig? = nil, s3Config: S3Config? = nil, storageType: StorageType) {
            self.associationId = associationId
            self.kinesisFirehoseConfig = kinesisFirehoseConfig
            self.kinesisStreamConfig = kinesisStreamConfig
            self.kinesisVideoStreamConfig = kinesisVideoStreamConfig
            self.s3Config = s3Config
            self.storageType = storageType
        }

        public func validate(name: String) throws {
            try self.validate(self.associationId, name: "associationId", parent: name, max: 100)
            try self.validate(self.associationId, name: "associationId", parent: name, min: 1)
            try self.kinesisVideoStreamConfig?.validate(name: "\(name).kinesisVideoStreamConfig")
            try self.s3Config?.validate(name: "\(name).s3Config")
        }

        private enum CodingKeys: String, CodingKey {
            case associationId = "AssociationId"
            case kinesisFirehoseConfig = "KinesisFirehoseConfig"
            case kinesisStreamConfig = "KinesisStreamConfig"
            case kinesisVideoStreamConfig = "KinesisVideoStreamConfig"
            case s3Config = "S3Config"
            case storageType = "StorageType"
        }
    }

    public struct InstanceSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the instance.
        public let arn: String?
        /// When the instance was created.
        public let createdTime: Date?
        /// The identifier of the instance.
        public let id: String?
        /// The identity management type of the instance.
        public let identityManagementType: DirectoryType?
        /// Whether inbound calls are enabled.
        public let inboundCallsEnabled: Bool?
        /// The alias of the instance.
        public let instanceAlias: String?
        /// The state of the instance.
        public let instanceStatus: InstanceStatus?
        /// Whether outbound calls are enabled.
        public let outboundCallsEnabled: Bool?
        /// The service role of the instance.
        public let serviceRole: String?

        public init(arn: String? = nil, createdTime: Date? = nil, id: String? = nil, identityManagementType: DirectoryType? = nil, inboundCallsEnabled: Bool? = nil, instanceAlias: String? = nil, instanceStatus: InstanceStatus? = nil, outboundCallsEnabled: Bool? = nil, serviceRole: String? = nil) {
            self.arn = arn
            self.createdTime = createdTime
            self.id = id
            self.identityManagementType = identityManagementType
            self.inboundCallsEnabled = inboundCallsEnabled
            self.instanceAlias = instanceAlias
            self.instanceStatus = instanceStatus
            self.outboundCallsEnabled = outboundCallsEnabled
            self.serviceRole = serviceRole
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case createdTime = "CreatedTime"
            case id = "Id"
            case identityManagementType = "IdentityManagementType"
            case inboundCallsEnabled = "InboundCallsEnabled"
            case instanceAlias = "InstanceAlias"
            case instanceStatus = "InstanceStatus"
            case outboundCallsEnabled = "OutboundCallsEnabled"
            case serviceRole = "ServiceRole"
        }
    }

    public struct IntegrationAssociationSummary: AWSDecodableShape {
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String?
        /// The Amazon Resource Name (ARN) for the AppIntegration.
        public let integrationArn: String?
        /// The Amazon Resource Name (ARN) for the AppIntegration association.
        public let integrationAssociationArn: String?
        /// The identifier for the AppIntegration association.
        public let integrationAssociationId: String?
        /// The integration type.
        public let integrationType: IntegrationType?
        /// The user-provided, friendly name for the external application.
        public let sourceApplicationName: String?
        /// The URL for the external application.
        public let sourceApplicationUrl: String?
        /// The name of the source.
        public let sourceType: SourceType?

        public init(instanceId: String? = nil, integrationArn: String? = nil, integrationAssociationArn: String? = nil, integrationAssociationId: String? = nil, integrationType: IntegrationType? = nil, sourceApplicationName: String? = nil, sourceApplicationUrl: String? = nil, sourceType: SourceType? = nil) {
            self.instanceId = instanceId
            self.integrationArn = integrationArn
            self.integrationAssociationArn = integrationAssociationArn
            self.integrationAssociationId = integrationAssociationId
            self.integrationType = integrationType
            self.sourceApplicationName = sourceApplicationName
            self.sourceApplicationUrl = sourceApplicationUrl
            self.sourceType = sourceType
        }

        private enum CodingKeys: String, CodingKey {
            case instanceId = "InstanceId"
            case integrationArn = "IntegrationArn"
            case integrationAssociationArn = "IntegrationAssociationArn"
            case integrationAssociationId = "IntegrationAssociationId"
            case integrationType = "IntegrationType"
            case sourceApplicationName = "SourceApplicationName"
            case sourceApplicationUrl = "SourceApplicationUrl"
            case sourceType = "SourceType"
        }
    }

    public struct KinesisFirehoseConfig: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the delivery stream.
        public let firehoseArn: String

        public init(firehoseArn: String) {
            self.firehoseArn = firehoseArn
        }

        private enum CodingKeys: String, CodingKey {
            case firehoseArn = "FirehoseArn"
        }
    }

    public struct KinesisStreamConfig: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the data stream.
        public let streamArn: String

        public init(streamArn: String) {
            self.streamArn = streamArn
        }

        private enum CodingKeys: String, CodingKey {
            case streamArn = "StreamArn"
        }
    }

    public struct KinesisVideoStreamConfig: AWSEncodableShape & AWSDecodableShape {
        /// The encryption configuration.
        public let encryptionConfig: EncryptionConfig
        /// The prefix of the video stream.
        public let prefix: String
        /// The number of hours data is retained in the stream. Kinesis Video Streams retains the data in a data store that is associated with the stream. The default value is 0, indicating that the stream does not persist data.
        public let retentionPeriodHours: Int

        public init(encryptionConfig: EncryptionConfig, prefix: String, retentionPeriodHours: Int) {
            self.encryptionConfig = encryptionConfig
            self.prefix = prefix
            self.retentionPeriodHours = retentionPeriodHours
        }

        public func validate(name: String) throws {
            try self.encryptionConfig.validate(name: "\(name).encryptionConfig")
            try self.validate(self.prefix, name: "prefix", parent: name, max: 128)
            try self.validate(self.prefix, name: "prefix", parent: name, min: 1)
            try self.validate(self.retentionPeriodHours, name: "retentionPeriodHours", parent: name, max: 87600)
            try self.validate(self.retentionPeriodHours, name: "retentionPeriodHours", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case encryptionConfig = "EncryptionConfig"
            case prefix = "Prefix"
            case retentionPeriodHours = "RetentionPeriodHours"
        }
    }

    public struct LexBot: AWSEncodableShape & AWSDecodableShape {
        /// The Region that the Amazon Lex bot was created in.
        public let lexRegion: String?
        /// The name of the Amazon Lex bot.
        public let name: String?

        public init(lexRegion: String? = nil, name: String? = nil) {
            self.lexRegion = lexRegion
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.lexRegion, name: "lexRegion", parent: name, max: 60)
            try self.validate(self.name, name: "name", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case lexRegion = "LexRegion"
            case name = "Name"
        }
    }

    public struct ListApprovedOriginsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
        public let nextToken: String?

        public init(instanceId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.instanceId = instanceId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 25)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListApprovedOriginsResponse: AWSDecodableShape {
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?
        /// The approved origins.
        public let origins: [String]?

        public init(nextToken: String? = nil, origins: [String]? = nil) {
            self.nextToken = nextToken
            self.origins = origins
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case origins = "Origins"
        }
    }

    public struct ListContactFlowsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "contactFlowTypes", location: .querystring(locationName: "contactFlowTypes")),
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The type of contact flow.
        public let contactFlowTypes: [ContactFlowType]?
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
        public let nextToken: String?

        public init(contactFlowTypes: [ContactFlowType]? = nil, instanceId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.contactFlowTypes = contactFlowTypes
            self.instanceId = instanceId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.contactFlowTypes, name: "contactFlowTypes", parent: name, max: 10)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListContactFlowsResponse: AWSDecodableShape {
        /// Information about the contact flows.
        public let contactFlowSummaryList: [ContactFlowSummary]?
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?

        public init(contactFlowSummaryList: [ContactFlowSummary]? = nil, nextToken: String? = nil) {
            self.contactFlowSummaryList = contactFlowSummaryList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case contactFlowSummaryList = "ContactFlowSummaryList"
            case nextToken = "NextToken"
        }
    }

    public struct ListHoursOfOperationsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
        public let nextToken: String?

        public init(instanceId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.instanceId = instanceId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListHoursOfOperationsResponse: AWSDecodableShape {
        /// Information about the hours of operation.
        public let hoursOfOperationSummaryList: [HoursOfOperationSummary]?
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?

        public init(hoursOfOperationSummaryList: [HoursOfOperationSummary]? = nil, nextToken: String? = nil) {
            self.hoursOfOperationSummaryList = hoursOfOperationSummaryList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case hoursOfOperationSummaryList = "HoursOfOperationSummaryList"
            case nextToken = "NextToken"
        }
    }

    public struct ListInstanceAttributesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
        public let nextToken: String?

        public init(instanceId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.instanceId = instanceId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 7)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListInstanceAttributesResponse: AWSDecodableShape {
        /// The attribute types.
        public let attributes: [Attribute]?
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?

        public init(attributes: [Attribute]? = nil, nextToken: String? = nil) {
            self.attributes = attributes
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
            case nextToken = "NextToken"
        }
    }

    public struct ListInstanceStorageConfigsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "resourceType", location: .querystring(locationName: "resourceType"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
        public let nextToken: String?
        /// A valid resource type.
        public let resourceType: InstanceStorageResourceType

        public init(instanceId: String, maxResults: Int? = nil, nextToken: String? = nil, resourceType: InstanceStorageResourceType) {
            self.instanceId = instanceId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceType = resourceType
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 10)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListInstanceStorageConfigsResponse: AWSDecodableShape {
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?
        /// A valid storage type.
        public let storageConfigs: [InstanceStorageConfig]?

        public init(nextToken: String? = nil, storageConfigs: [InstanceStorageConfig]? = nil) {
            self.nextToken = nextToken
            self.storageConfigs = storageConfigs
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case storageConfigs = "StorageConfigs"
        }
    }

    public struct ListInstancesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 10)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListInstancesResponse: AWSDecodableShape {
        /// Information about the instances.
        public let instanceSummaryList: [InstanceSummary]?
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?

        public init(instanceSummaryList: [InstanceSummary]? = nil, nextToken: String? = nil) {
            self.instanceSummaryList = instanceSummaryList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case instanceSummaryList = "InstanceSummaryList"
            case nextToken = "NextToken"
        }
    }

    public struct ListIntegrationAssociationsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
        public let nextToken: String?

        public init(instanceId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.instanceId = instanceId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListIntegrationAssociationsResponse: AWSDecodableShape {
        /// The AppIntegration associations.
        public let integrationAssociationSummaryList: [IntegrationAssociationSummary]?
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?

        public init(integrationAssociationSummaryList: [IntegrationAssociationSummary]? = nil, nextToken: String? = nil) {
            self.integrationAssociationSummaryList = integrationAssociationSummaryList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case integrationAssociationSummaryList = "IntegrationAssociationSummaryList"
            case nextToken = "NextToken"
        }
    }

    public struct ListLambdaFunctionsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
        public let nextToken: String?

        public init(instanceId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.instanceId = instanceId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 25)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListLambdaFunctionsResponse: AWSDecodableShape {
        /// The Lambdafunction ARNs associated with the specified instance.
        public let lambdaFunctions: [String]?
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?

        public init(lambdaFunctions: [String]? = nil, nextToken: String? = nil) {
            self.lambdaFunctions = lambdaFunctions
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case lambdaFunctions = "LambdaFunctions"
            case nextToken = "NextToken"
        }
    }

    public struct ListLexBotsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
        public let nextToken: String?

        public init(instanceId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.instanceId = instanceId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 25)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListLexBotsResponse: AWSDecodableShape {
        /// The names and Regions of the Amazon Lex bots associated with the specified instance.
        public let lexBots: [LexBot]?
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?

        public init(lexBots: [LexBot]? = nil, nextToken: String? = nil) {
            self.lexBots = lexBots
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case lexBots = "LexBots"
            case nextToken = "NextToken"
        }
    }

    public struct ListPhoneNumbersRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "phoneNumberCountryCodes", location: .querystring(locationName: "phoneNumberCountryCodes")),
            AWSMemberEncoding(label: "phoneNumberTypes", location: .querystring(locationName: "phoneNumberTypes"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
        public let nextToken: String?
        /// The ISO country code.
        public let phoneNumberCountryCodes: [PhoneNumberCountryCode]?
        /// The type of phone number.
        public let phoneNumberTypes: [PhoneNumberType]?

        public init(instanceId: String, maxResults: Int? = nil, nextToken: String? = nil, phoneNumberCountryCodes: [PhoneNumberCountryCode]? = nil, phoneNumberTypes: [PhoneNumberType]? = nil) {
            self.instanceId = instanceId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.phoneNumberCountryCodes = phoneNumberCountryCodes
            self.phoneNumberTypes = phoneNumberTypes
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.phoneNumberCountryCodes, name: "phoneNumberCountryCodes", parent: name, max: 10)
            try self.validate(self.phoneNumberTypes, name: "phoneNumberTypes", parent: name, max: 2)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListPhoneNumbersResponse: AWSDecodableShape {
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?
        /// Information about the phone numbers.
        public let phoneNumberSummaryList: [PhoneNumberSummary]?

        public init(nextToken: String? = nil, phoneNumberSummaryList: [PhoneNumberSummary]? = nil) {
            self.nextToken = nextToken
            self.phoneNumberSummaryList = phoneNumberSummaryList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case phoneNumberSummaryList = "PhoneNumberSummaryList"
        }
    }

    public struct ListPromptsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
        public let nextToken: String?

        public init(instanceId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.instanceId = instanceId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListPromptsResponse: AWSDecodableShape {
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?
        /// Information about the prompts.
        public let promptSummaryList: [PromptSummary]?

        public init(nextToken: String? = nil, promptSummaryList: [PromptSummary]? = nil) {
            self.nextToken = nextToken
            self.promptSummaryList = promptSummaryList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case promptSummaryList = "PromptSummaryList"
        }
    }

    public struct ListQueueQuickConnectsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "queueId", location: .uri(locationName: "QueueId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
        public let nextToken: String?
        /// The identifier for the queue.
        public let queueId: String

        public init(instanceId: String, maxResults: Int? = nil, nextToken: String? = nil, queueId: String) {
            self.instanceId = instanceId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.queueId = queueId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListQueueQuickConnectsResponse: AWSDecodableShape {
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?
        /// Information about the quick connects.
        public let quickConnectSummaryList: [QuickConnectSummary]?

        public init(nextToken: String? = nil, quickConnectSummaryList: [QuickConnectSummary]? = nil) {
            self.nextToken = nextToken
            self.quickConnectSummaryList = quickConnectSummaryList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case quickConnectSummaryList = "QuickConnectSummaryList"
        }
    }

    public struct ListQueuesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "queueTypes", location: .querystring(locationName: "queueTypes"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
        public let nextToken: String?
        /// The type of queue.
        public let queueTypes: [QueueType]?

        public init(instanceId: String, maxResults: Int? = nil, nextToken: String? = nil, queueTypes: [QueueType]? = nil) {
            self.instanceId = instanceId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.queueTypes = queueTypes
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.queueTypes, name: "queueTypes", parent: name, max: 2)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListQueuesResponse: AWSDecodableShape {
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?
        /// Information about the queues.
        public let queueSummaryList: [QueueSummary]?

        public init(nextToken: String? = nil, queueSummaryList: [QueueSummary]? = nil) {
            self.nextToken = nextToken
            self.queueSummaryList = queueSummaryList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case queueSummaryList = "QueueSummaryList"
        }
    }

    public struct ListQuickConnectsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "quickConnectTypes", location: .querystring(locationName: "QuickConnectTypes"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
        public let nextToken: String?
        /// The type of quick connect. In the Amazon Connect console, when you create a quick connect, you are prompted to assign one of the following types: Agent (USER), External (PHONE_NUMBER), or Queue (QUEUE).
        public let quickConnectTypes: [QuickConnectType]?

        public init(instanceId: String, maxResults: Int? = nil, nextToken: String? = nil, quickConnectTypes: [QuickConnectType]? = nil) {
            self.instanceId = instanceId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.quickConnectTypes = quickConnectTypes
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.quickConnectTypes, name: "quickConnectTypes", parent: name, max: 3)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListQuickConnectsResponse: AWSDecodableShape {
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?
        /// Information about the quick connects.
        public let quickConnectSummaryList: [QuickConnectSummary]?

        public init(nextToken: String? = nil, quickConnectSummaryList: [QuickConnectSummary]? = nil) {
            self.nextToken = nextToken
            self.quickConnectSummaryList = quickConnectSummaryList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case quickConnectSummaryList = "QuickConnectSummaryList"
        }
    }

    public struct ListRoutingProfileQueuesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "routingProfileId", location: .uri(locationName: "RoutingProfileId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
        public let nextToken: String?
        /// The identifier of the routing profile.
        public let routingProfileId: String

        public init(instanceId: String, maxResults: Int? = nil, nextToken: String? = nil, routingProfileId: String) {
            self.instanceId = instanceId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.routingProfileId = routingProfileId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListRoutingProfileQueuesResponse: AWSDecodableShape {
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?
        /// Information about the routing profiles.
        public let routingProfileQueueConfigSummaryList: [RoutingProfileQueueConfigSummary]?

        public init(nextToken: String? = nil, routingProfileQueueConfigSummaryList: [RoutingProfileQueueConfigSummary]? = nil) {
            self.nextToken = nextToken
            self.routingProfileQueueConfigSummaryList = routingProfileQueueConfigSummaryList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case routingProfileQueueConfigSummaryList = "RoutingProfileQueueConfigSummaryList"
        }
    }

    public struct ListRoutingProfilesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
        public let nextToken: String?

        public init(instanceId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.instanceId = instanceId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListRoutingProfilesResponse: AWSDecodableShape {
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?
        /// Information about the routing profiles.
        public let routingProfileSummaryList: [RoutingProfileSummary]?

        public init(nextToken: String? = nil, routingProfileSummaryList: [RoutingProfileSummary]? = nil) {
            self.nextToken = nextToken
            self.routingProfileSummaryList = routingProfileSummaryList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case routingProfileSummaryList = "RoutingProfileSummaryList"
        }
    }

    public struct ListSecurityKeysRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
        public let nextToken: String?

        public init(instanceId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.instanceId = instanceId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 2)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListSecurityKeysResponse: AWSDecodableShape {
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?
        /// The security keys.
        public let securityKeys: [SecurityKey]?

        public init(nextToken: String? = nil, securityKeys: [SecurityKey]? = nil) {
            self.nextToken = nextToken
            self.securityKeys = securityKeys
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case securityKeys = "SecurityKeys"
        }
    }

    public struct ListSecurityProfilesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
        public let nextToken: String?

        public init(instanceId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.instanceId = instanceId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListSecurityProfilesResponse: AWSDecodableShape {
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?
        /// Information about the security profiles.
        public let securityProfileSummaryList: [SecurityProfileSummary]?

        public init(nextToken: String? = nil, securityProfileSummaryList: [SecurityProfileSummary]? = nil) {
            self.nextToken = nextToken
            self.securityProfileSummaryList = securityProfileSummaryList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case securityProfileSummaryList = "SecurityProfileSummaryList"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri(locationName: "resourceArn"))
        ]

        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// Information about the tags.
        public let tags: [String: String]?

        public init(tags: [String: String]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags
        }
    }

    public struct ListUseCasesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "integrationAssociationId", location: .uri(locationName: "IntegrationAssociationId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The identifier for the integration association.
        public let integrationAssociationId: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
        public let nextToken: String?

        public init(instanceId: String, integrationAssociationId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.instanceId = instanceId
            self.integrationAssociationId = integrationAssociationId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.integrationAssociationId, name: "integrationAssociationId", parent: name, max: 200)
            try self.validate(self.integrationAssociationId, name: "integrationAssociationId", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListUseCasesResponse: AWSDecodableShape {
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?
        /// The use cases.
        public let useCaseSummaryList: [UseCase]?

        public init(nextToken: String? = nil, useCaseSummaryList: [UseCase]? = nil) {
            self.nextToken = nextToken
            self.useCaseSummaryList = useCaseSummaryList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case useCaseSummaryList = "UseCaseSummaryList"
        }
    }

    public struct ListUserHierarchyGroupsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
        public let nextToken: String?

        public init(instanceId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.instanceId = instanceId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListUserHierarchyGroupsResponse: AWSDecodableShape {
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?
        /// Information about the hierarchy groups.
        public let userHierarchyGroupSummaryList: [HierarchyGroupSummary]?

        public init(nextToken: String? = nil, userHierarchyGroupSummaryList: [HierarchyGroupSummary]? = nil) {
            self.nextToken = nextToken
            self.userHierarchyGroupSummaryList = userHierarchyGroupSummaryList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case userHierarchyGroupSummaryList = "UserHierarchyGroupSummaryList"
        }
    }

    public struct ListUsersRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
        public let nextToken: String?

        public init(instanceId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.instanceId = instanceId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListUsersResponse: AWSDecodableShape {
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?
        /// Information about the users.
        public let userSummaryList: [UserSummary]?

        public init(nextToken: String? = nil, userSummaryList: [UserSummary]? = nil) {
            self.nextToken = nextToken
            self.userSummaryList = userSummaryList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case userSummaryList = "UserSummaryList"
        }
    }

    public struct MediaConcurrency: AWSEncodableShape & AWSDecodableShape {
        /// The channels that agents can handle in the Contact Control Panel (CCP).
        public let channel: Channel
        /// The number of contacts an agent can have on a channel simultaneously.
        public let concurrency: Int

        public init(channel: Channel, concurrency: Int) {
            self.channel = channel
            self.concurrency = concurrency
        }

        public func validate(name: String) throws {
            try self.validate(self.concurrency, name: "concurrency", parent: name, max: 10)
            try self.validate(self.concurrency, name: "concurrency", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case channel = "Channel"
            case concurrency = "Concurrency"
        }
    }

    public struct OutboundCallerConfig: AWSEncodableShape & AWSDecodableShape {
        /// The caller ID name.
        public let outboundCallerIdName: String?
        /// The caller ID number.
        public let outboundCallerIdNumberId: String?
        /// The outbound whisper flow to be used during an outbound call.
        public let outboundFlowId: String?

        public init(outboundCallerIdName: String? = nil, outboundCallerIdNumberId: String? = nil, outboundFlowId: String? = nil) {
            self.outboundCallerIdName = outboundCallerIdName
            self.outboundCallerIdNumberId = outboundCallerIdNumberId
            self.outboundFlowId = outboundFlowId
        }

        public func validate(name: String) throws {
            try self.validate(self.outboundCallerIdName, name: "outboundCallerIdName", parent: name, max: 255)
            try self.validate(self.outboundCallerIdName, name: "outboundCallerIdName", parent: name, min: 1)
            try self.validate(self.outboundFlowId, name: "outboundFlowId", parent: name, max: 500)
        }

        private enum CodingKeys: String, CodingKey {
            case outboundCallerIdName = "OutboundCallerIdName"
            case outboundCallerIdNumberId = "OutboundCallerIdNumberId"
            case outboundFlowId = "OutboundFlowId"
        }
    }

    public struct ParticipantDetails: AWSEncodableShape {
        /// Display name of the participant.
        public let displayName: String

        public init(displayName: String) {
            self.displayName = displayName
        }

        public func validate(name: String) throws {
            try self.validate(self.displayName, name: "displayName", parent: name, max: 256)
            try self.validate(self.displayName, name: "displayName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case displayName = "DisplayName"
        }
    }

    public struct PhoneNumberQuickConnectConfig: AWSEncodableShape & AWSDecodableShape {
        /// The phone number in E.164 format.
        public let phoneNumber: String

        public init(phoneNumber: String) {
            self.phoneNumber = phoneNumber
        }

        private enum CodingKeys: String, CodingKey {
            case phoneNumber = "PhoneNumber"
        }
    }

    public struct PhoneNumberSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the phone number.
        public let arn: String?
        /// The identifier of the phone number.
        public let id: String?
        /// The phone number.
        public let phoneNumber: String?
        /// The ISO country code.
        public let phoneNumberCountryCode: PhoneNumberCountryCode?
        /// The type of phone number.
        public let phoneNumberType: PhoneNumberType?

        public init(arn: String? = nil, id: String? = nil, phoneNumber: String? = nil, phoneNumberCountryCode: PhoneNumberCountryCode? = nil, phoneNumberType: PhoneNumberType? = nil) {
            self.arn = arn
            self.id = id
            self.phoneNumber = phoneNumber
            self.phoneNumberCountryCode = phoneNumberCountryCode
            self.phoneNumberType = phoneNumberType
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case id = "Id"
            case phoneNumber = "PhoneNumber"
            case phoneNumberCountryCode = "PhoneNumberCountryCode"
            case phoneNumberType = "PhoneNumberType"
        }
    }

    public struct PromptSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the prompt.
        public let arn: String?
        /// The identifier of the prompt.
        public let id: String?
        /// The name of the prompt.
        public let name: String?

        public init(arn: String? = nil, id: String? = nil, name: String? = nil) {
            self.arn = arn
            self.id = id
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case id = "Id"
            case name = "Name"
        }
    }

    public struct Queue: AWSDecodableShape {
        /// The description of the queue.
        public let description: String?
        /// The identifier for the hours of operation.
        public let hoursOfOperationId: String?
        /// The maximum number of contacts that can be in the queue before it is considered full.
        public let maxContacts: Int?
        /// The name of the queue.
        public let name: String?
        /// The outbound caller ID name, number, and outbound whisper flow.
        public let outboundCallerConfig: OutboundCallerConfig?
        /// The Amazon Resource Name (ARN) for the queue.
        public let queueArn: String?
        /// The identifier for the queue.
        public let queueId: String?
        /// The status of the queue.
        public let status: QueueStatus?
        /// One or more tags.
        public let tags: [String: String]?

        public init(description: String? = nil, hoursOfOperationId: String? = nil, maxContacts: Int? = nil, name: String? = nil, outboundCallerConfig: OutboundCallerConfig? = nil, queueArn: String? = nil, queueId: String? = nil, status: QueueStatus? = nil, tags: [String: String]? = nil) {
            self.description = description
            self.hoursOfOperationId = hoursOfOperationId
            self.maxContacts = maxContacts
            self.name = name
            self.outboundCallerConfig = outboundCallerConfig
            self.queueArn = queueArn
            self.queueId = queueId
            self.status = status
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case hoursOfOperationId = "HoursOfOperationId"
            case maxContacts = "MaxContacts"
            case name = "Name"
            case outboundCallerConfig = "OutboundCallerConfig"
            case queueArn = "QueueArn"
            case queueId = "QueueId"
            case status = "Status"
            case tags = "Tags"
        }
    }

    public struct QueueQuickConnectConfig: AWSEncodableShape & AWSDecodableShape {
        /// The identifier of the contact flow.
        public let contactFlowId: String
        /// The identifier for the queue.
        public let queueId: String

        public init(contactFlowId: String, queueId: String) {
            self.contactFlowId = contactFlowId
            self.queueId = queueId
        }

        public func validate(name: String) throws {
            try self.validate(self.contactFlowId, name: "contactFlowId", parent: name, max: 500)
        }

        private enum CodingKeys: String, CodingKey {
            case contactFlowId = "ContactFlowId"
            case queueId = "QueueId"
        }
    }

    public struct QueueReference: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the queue.
        public let arn: String?
        /// The identifier of the queue.
        public let id: String?

        public init(arn: String? = nil, id: String? = nil) {
            self.arn = arn
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case id = "Id"
        }
    }

    public struct QueueSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the queue.
        public let arn: String?
        /// The identifier of the queue.
        public let id: String?
        /// The name of the queue.
        public let name: String?
        /// The type of queue.
        public let queueType: QueueType?

        public init(arn: String? = nil, id: String? = nil, name: String? = nil, queueType: QueueType? = nil) {
            self.arn = arn
            self.id = id
            self.name = name
            self.queueType = queueType
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case id = "Id"
            case name = "Name"
            case queueType = "QueueType"
        }
    }

    public struct QuickConnect: AWSDecodableShape {
        /// The description.
        public let description: String?
        /// The name of the quick connect.
        public let name: String?
        /// The Amazon Resource Name (ARN) of the quick connect.
        public let quickConnectARN: String?
        /// Contains information about the quick connect.
        public let quickConnectConfig: QuickConnectConfig?
        /// The identifier for the quick connect.
        public let quickConnectId: String?
        /// One or more tags.
        public let tags: [String: String]?

        public init(description: String? = nil, name: String? = nil, quickConnectARN: String? = nil, quickConnectConfig: QuickConnectConfig? = nil, quickConnectId: String? = nil, tags: [String: String]? = nil) {
            self.description = description
            self.name = name
            self.quickConnectARN = quickConnectARN
            self.quickConnectConfig = quickConnectConfig
            self.quickConnectId = quickConnectId
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case name = "Name"
            case quickConnectARN = "QuickConnectARN"
            case quickConnectConfig = "QuickConnectConfig"
            case quickConnectId = "QuickConnectId"
            case tags = "Tags"
        }
    }

    public struct QuickConnectConfig: AWSEncodableShape & AWSDecodableShape {
        /// The phone configuration. This is required only if QuickConnectType is PHONE_NUMBER.
        public let phoneConfig: PhoneNumberQuickConnectConfig?
        /// The queue configuration. This is required only if QuickConnectType is QUEUE.
        public let queueConfig: QueueQuickConnectConfig?
        /// The type of quick connect. In the Amazon Connect console, when you create a quick connect, you are prompted to assign one of the following types: Agent (USER), External (PHONE_NUMBER), or Queue (QUEUE).
        public let quickConnectType: QuickConnectType
        /// The user configuration. This is required only if QuickConnectType is USER.
        public let userConfig: UserQuickConnectConfig?

        public init(phoneConfig: PhoneNumberQuickConnectConfig? = nil, queueConfig: QueueQuickConnectConfig? = nil, quickConnectType: QuickConnectType, userConfig: UserQuickConnectConfig? = nil) {
            self.phoneConfig = phoneConfig
            self.queueConfig = queueConfig
            self.quickConnectType = quickConnectType
            self.userConfig = userConfig
        }

        public func validate(name: String) throws {
            try self.queueConfig?.validate(name: "\(name).queueConfig")
            try self.userConfig?.validate(name: "\(name).userConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case phoneConfig = "PhoneConfig"
            case queueConfig = "QueueConfig"
            case quickConnectType = "QuickConnectType"
            case userConfig = "UserConfig"
        }
    }

    public struct QuickConnectSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the quick connect.
        public let arn: String?
        /// The identifier for the quick connect.
        public let id: String?
        /// The name of the quick connect.
        public let name: String?
        /// The type of quick connect. In the Amazon Connect console, when you create a quick connect, you are prompted to assign one of the following types: Agent (USER), External (PHONE_NUMBER), or Queue (QUEUE).
        public let quickConnectType: QuickConnectType?

        public init(arn: String? = nil, id: String? = nil, name: String? = nil, quickConnectType: QuickConnectType? = nil) {
            self.arn = arn
            self.id = id
            self.name = name
            self.quickConnectType = quickConnectType
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case id = "Id"
            case name = "Name"
            case quickConnectType = "QuickConnectType"
        }
    }

    public struct Reference: AWSEncodableShape {
        /// A valid URL.
        public let type: ReferenceType
        /// A formatted URL that displays to an agent in the Contact Control Panel (CCP)
        public let value: String

        public init(type: ReferenceType, value: String) {
            self.type = type
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.value, name: "value", parent: name, max: 4096)
            try self.validate(self.value, name: "value", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case type = "Type"
            case value = "Value"
        }
    }

    public struct ResumeContactRecordingRequest: AWSEncodableShape {
        /// The identifier of the contact.
        public let contactId: String
        /// The identifier of the contact. This is the identifier of the contact associated with the first interaction with the contact center.
        public let initialContactId: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String

        public init(contactId: String, initialContactId: String, instanceId: String) {
            self.contactId = contactId
            self.initialContactId = initialContactId
            self.instanceId = instanceId
        }

        public func validate(name: String) throws {
            try self.validate(self.contactId, name: "contactId", parent: name, max: 256)
            try self.validate(self.contactId, name: "contactId", parent: name, min: 1)
            try self.validate(self.initialContactId, name: "initialContactId", parent: name, max: 256)
            try self.validate(self.initialContactId, name: "initialContactId", parent: name, min: 1)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case contactId = "ContactId"
            case initialContactId = "InitialContactId"
            case instanceId = "InstanceId"
        }
    }

    public struct ResumeContactRecordingResponse: AWSDecodableShape {
        public init() {}
    }

    public struct RoutingProfile: AWSDecodableShape {
        /// The identifier of the default outbound queue for this routing profile.
        public let defaultOutboundQueueId: String?
        /// The description of the routing profile.
        public let description: String?
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String?
        /// The channels agents can handle in the Contact Control Panel (CCP) for this routing profile.
        public let mediaConcurrencies: [MediaConcurrency]?
        /// The name of the routing profile.
        public let name: String?
        /// The Amazon Resource Name (ARN) of the routing profile.
        public let routingProfileArn: String?
        /// The identifier of the routing profile.
        public let routingProfileId: String?
        /// One or more tags.
        public let tags: [String: String]?

        public init(defaultOutboundQueueId: String? = nil, description: String? = nil, instanceId: String? = nil, mediaConcurrencies: [MediaConcurrency]? = nil, name: String? = nil, routingProfileArn: String? = nil, routingProfileId: String? = nil, tags: [String: String]? = nil) {
            self.defaultOutboundQueueId = defaultOutboundQueueId
            self.description = description
            self.instanceId = instanceId
            self.mediaConcurrencies = mediaConcurrencies
            self.name = name
            self.routingProfileArn = routingProfileArn
            self.routingProfileId = routingProfileId
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case defaultOutboundQueueId = "DefaultOutboundQueueId"
            case description = "Description"
            case instanceId = "InstanceId"
            case mediaConcurrencies = "MediaConcurrencies"
            case name = "Name"
            case routingProfileArn = "RoutingProfileArn"
            case routingProfileId = "RoutingProfileId"
            case tags = "Tags"
        }
    }

    public struct RoutingProfileQueueConfig: AWSEncodableShape {
        /// The delay, in seconds, a contact should be in the queue before they are routed to an available agent. For more information, see Queues: priority and delay in the Amazon Connect Administrator Guide.
        public let delay: Int
        /// The order in which contacts are to be handled for the queue. For more information, see Queues: priority and delay.
        public let priority: Int
        /// Contains information about a queue resource.
        public let queueReference: RoutingProfileQueueReference

        public init(delay: Int, priority: Int, queueReference: RoutingProfileQueueReference) {
            self.delay = delay
            self.priority = priority
            self.queueReference = queueReference
        }

        public func validate(name: String) throws {
            try self.validate(self.delay, name: "delay", parent: name, max: 9999)
            try self.validate(self.delay, name: "delay", parent: name, min: 0)
            try self.validate(self.priority, name: "priority", parent: name, max: 99)
            try self.validate(self.priority, name: "priority", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case delay = "Delay"
            case priority = "Priority"
            case queueReference = "QueueReference"
        }
    }

    public struct RoutingProfileQueueConfigSummary: AWSDecodableShape {
        /// The channels this queue supports.
        public let channel: Channel
        /// The delay, in seconds, that a contact should be in the queue before they are routed to an available agent. For more information, see Queues: priority and delay in the Amazon Connect Administrator Guide.
        public let delay: Int
        /// The order in which contacts are to be handled for the queue. For more information, see Queues: priority and delay.
        public let priority: Int
        /// The Amazon Resource Name (ARN) of the queue.
        public let queueArn: String
        /// The identifier for the queue.
        public let queueId: String
        /// The name of the queue.
        public let queueName: String

        public init(channel: Channel, delay: Int, priority: Int, queueArn: String, queueId: String, queueName: String) {
            self.channel = channel
            self.delay = delay
            self.priority = priority
            self.queueArn = queueArn
            self.queueId = queueId
            self.queueName = queueName
        }

        private enum CodingKeys: String, CodingKey {
            case channel = "Channel"
            case delay = "Delay"
            case priority = "Priority"
            case queueArn = "QueueArn"
            case queueId = "QueueId"
            case queueName = "QueueName"
        }
    }

    public struct RoutingProfileQueueReference: AWSEncodableShape {
        /// The channels agents can handle in the Contact Control Panel (CCP) for this routing profile.
        public let channel: Channel
        /// The identifier for the queue.
        public let queueId: String

        public init(channel: Channel, queueId: String) {
            self.channel = channel
            self.queueId = queueId
        }

        private enum CodingKeys: String, CodingKey {
            case channel = "Channel"
            case queueId = "QueueId"
        }
    }

    public struct RoutingProfileSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the routing profile.
        public let arn: String?
        /// The identifier of the routing profile.
        public let id: String?
        /// The name of the routing profile.
        public let name: String?

        public init(arn: String? = nil, id: String? = nil, name: String? = nil) {
            self.arn = arn
            self.id = id
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case id = "Id"
            case name = "Name"
        }
    }

    public struct S3Config: AWSEncodableShape & AWSDecodableShape {
        /// The S3 bucket name.
        public let bucketName: String
        /// The S3 bucket prefix.
        public let bucketPrefix: String
        /// The Amazon S3 encryption configuration.
        public let encryptionConfig: EncryptionConfig?

        public init(bucketName: String, bucketPrefix: String, encryptionConfig: EncryptionConfig? = nil) {
            self.bucketName = bucketName
            self.bucketPrefix = bucketPrefix
            self.encryptionConfig = encryptionConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.bucketName, name: "bucketName", parent: name, max: 128)
            try self.validate(self.bucketName, name: "bucketName", parent: name, min: 1)
            try self.validate(self.bucketPrefix, name: "bucketPrefix", parent: name, max: 128)
            try self.validate(self.bucketPrefix, name: "bucketPrefix", parent: name, min: 1)
            try self.encryptionConfig?.validate(name: "\(name).encryptionConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case bucketName = "BucketName"
            case bucketPrefix = "BucketPrefix"
            case encryptionConfig = "EncryptionConfig"
        }
    }

    public struct SecurityKey: AWSDecodableShape {
        /// The existing association identifier that uniquely identifies the resource type and storage config for the given instance ID.
        public let associationId: String?
        /// When the security key was created.
        public let creationTime: Date?
        /// The key of the security key.
        public let key: String?

        public init(associationId: String? = nil, creationTime: Date? = nil, key: String? = nil) {
            self.associationId = associationId
            self.creationTime = creationTime
            self.key = key
        }

        private enum CodingKeys: String, CodingKey {
            case associationId = "AssociationId"
            case creationTime = "CreationTime"
            case key = "Key"
        }
    }

    public struct SecurityProfileSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the security profile.
        public let arn: String?
        /// The identifier of the security profile.
        public let id: String?
        /// The name of the security profile.
        public let name: String?

        public init(arn: String? = nil, id: String? = nil, name: String? = nil) {
            self.arn = arn
            self.id = id
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case id = "Id"
            case name = "Name"
        }
    }

    public struct StartChatContactRequest: AWSEncodableShape {
        /// A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes. They can be accessed in contact flows just like any other contact attributes.  There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can include only alphanumeric, dash, and underscore characters.
        public let attributes: [String: String]?
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// The identifier of the contact flow for initiating the chat. To see the ContactFlowId in the Amazon Connect console user interface, on the navigation menu go to Routing, Contact Flows. Choose the contact flow. On the contact flow page, under the name of the contact flow, choose Show additional flow information. The ContactFlowId is the last part of the ARN, shown here in bold:  arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/846ec553-a005-41c0-8341-xxxxxxxxxxxx
        public let contactFlowId: String
        /// The initial message to be sent to the newly created chat.
        public let initialMessage: ChatMessage?
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// Information identifying the participant.
        public let participantDetails: ParticipantDetails

        public init(attributes: [String: String]? = nil, clientToken: String? = StartChatContactRequest.idempotencyToken(), contactFlowId: String, initialMessage: ChatMessage? = nil, instanceId: String, participantDetails: ParticipantDetails) {
            self.attributes = attributes
            self.clientToken = clientToken
            self.contactFlowId = contactFlowId
            self.initialMessage = initialMessage
            self.instanceId = instanceId
            self.participantDetails = participantDetails
        }

        public func validate(name: String) throws {
            try self.attributes?.forEach {
                try validate($0.key, name: "attributes.key", parent: name, max: 32767)
                try validate($0.key, name: "attributes.key", parent: name, min: 1)
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, max: 32767)
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, min: 0)
            }
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 500)
            try self.validate(self.contactFlowId, name: "contactFlowId", parent: name, max: 500)
            try self.initialMessage?.validate(name: "\(name).initialMessage")
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.participantDetails.validate(name: "\(name).participantDetails")
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
            case clientToken = "ClientToken"
            case contactFlowId = "ContactFlowId"
            case initialMessage = "InitialMessage"
            case instanceId = "InstanceId"
            case participantDetails = "ParticipantDetails"
        }
    }

    public struct StartChatContactResponse: AWSDecodableShape {
        /// The identifier of this contact within the Amazon Connect instance.
        public let contactId: String?
        /// The identifier for a chat participant. The participantId for a chat participant is the same throughout the chat lifecycle.
        public let participantId: String?
        /// The token used by the chat participant to call CreateParticipantConnection. The participant token is valid for the lifetime of a chat participant.
        public let participantToken: String?

        public init(contactId: String? = nil, participantId: String? = nil, participantToken: String? = nil) {
            self.contactId = contactId
            self.participantId = participantId
            self.participantToken = participantToken
        }

        private enum CodingKeys: String, CodingKey {
            case contactId = "ContactId"
            case participantId = "ParticipantId"
            case participantToken = "ParticipantToken"
        }
    }

    public struct StartContactRecordingRequest: AWSEncodableShape {
        /// The identifier of the contact.
        public let contactId: String
        /// The identifier of the contact. This is the identifier of the contact associated with the first interaction with the contact center.
        public let initialContactId: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The person being recorded.
        public let voiceRecordingConfiguration: VoiceRecordingConfiguration

        public init(contactId: String, initialContactId: String, instanceId: String, voiceRecordingConfiguration: VoiceRecordingConfiguration) {
            self.contactId = contactId
            self.initialContactId = initialContactId
            self.instanceId = instanceId
            self.voiceRecordingConfiguration = voiceRecordingConfiguration
        }

        public func validate(name: String) throws {
            try self.validate(self.contactId, name: "contactId", parent: name, max: 256)
            try self.validate(self.contactId, name: "contactId", parent: name, min: 1)
            try self.validate(self.initialContactId, name: "initialContactId", parent: name, max: 256)
            try self.validate(self.initialContactId, name: "initialContactId", parent: name, min: 1)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case contactId = "ContactId"
            case initialContactId = "InitialContactId"
            case instanceId = "InstanceId"
            case voiceRecordingConfiguration = "VoiceRecordingConfiguration"
        }
    }

    public struct StartContactRecordingResponse: AWSDecodableShape {
        public init() {}
    }

    public struct StartOutboundVoiceContactRequest: AWSEncodableShape {
        /// A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in contact flows just like any other contact attributes. There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can include only alphanumeric, dash, and underscore characters.
        public let attributes: [String: String]?
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. The token is valid for 7 days after creation. If a contact is already started, the contact ID is returned. If the contact is disconnected, a new contact is started.
        public let clientToken: String?
        /// The identifier of the contact flow for the outbound call. To see the ContactFlowId in the Amazon Connect console user interface, on the navigation menu go to Routing, Contact Flows. Choose the contact flow. On the contact flow page, under the name of the contact flow, choose Show additional flow information. The ContactFlowId is the last part of the ARN, shown here in bold:  arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/846ec553-a005-41c0-8341-xxxxxxxxxxxx
        public let contactFlowId: String
        /// The phone number of the customer, in E.164 format.
        public let destinationPhoneNumber: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The queue for the call. If you specify a queue, the phone displayed for caller ID is the phone number specified in the queue. If you do not specify a queue, the queue defined in the contact flow is used. If you do not specify a queue, you must specify a source phone number.
        public let queueId: String?
        /// The phone number associated with the Amazon Connect instance, in E.164 format. If you do not specify a source phone number, you must specify a queue.
        public let sourcePhoneNumber: String?

        public init(attributes: [String: String]? = nil, clientToken: String? = StartOutboundVoiceContactRequest.idempotencyToken(), contactFlowId: String, destinationPhoneNumber: String, instanceId: String, queueId: String? = nil, sourcePhoneNumber: String? = nil) {
            self.attributes = attributes
            self.clientToken = clientToken
            self.contactFlowId = contactFlowId
            self.destinationPhoneNumber = destinationPhoneNumber
            self.instanceId = instanceId
            self.queueId = queueId
            self.sourcePhoneNumber = sourcePhoneNumber
        }

        public func validate(name: String) throws {
            try self.attributes?.forEach {
                try validate($0.key, name: "attributes.key", parent: name, max: 32767)
                try validate($0.key, name: "attributes.key", parent: name, min: 1)
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, max: 32767)
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, min: 0)
            }
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 500)
            try self.validate(self.contactFlowId, name: "contactFlowId", parent: name, max: 500)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
            case clientToken = "ClientToken"
            case contactFlowId = "ContactFlowId"
            case destinationPhoneNumber = "DestinationPhoneNumber"
            case instanceId = "InstanceId"
            case queueId = "QueueId"
            case sourcePhoneNumber = "SourcePhoneNumber"
        }
    }

    public struct StartOutboundVoiceContactResponse: AWSDecodableShape {
        /// The identifier of this contact within the Amazon Connect instance.
        public let contactId: String?

        public init(contactId: String? = nil) {
            self.contactId = contactId
        }

        private enum CodingKeys: String, CodingKey {
            case contactId = "ContactId"
        }
    }

    public struct StartTaskContactRequest: AWSEncodableShape {
        /// A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in contact flows just like any other contact attributes. There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can include only alphanumeric, dash, and underscore characters.
        public let attributes: [String: String]?
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// The identifier of the contact flow for initiating the tasks. To see the ContactFlowId in the Amazon Connect console user interface, on the navigation menu go to Routing, Contact Flows. Choose the contact flow. On the contact flow page, under the name of the contact flow, choose Show additional flow information. The ContactFlowId is the last part of the ARN, shown here in bold:  arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/846ec553-a005-41c0-8341-xxxxxxxxxxxx
        public let contactFlowId: String
        /// A description of the task that is shown to an agent in the Contact Control Panel (CCP).
        public let description: String?
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The name of a task that is shown to an agent in the Contact Control Panel (CCP).
        public let name: String
        /// The identifier of the previous chat, voice, or task contact.
        public let previousContactId: String?
        /// A formatted URL that is shown to an agent in the Contact Control Panel (CCP).
        public let references: [String: Reference]?

        public init(attributes: [String: String]? = nil, clientToken: String? = StartTaskContactRequest.idempotencyToken(), contactFlowId: String, description: String? = nil, instanceId: String, name: String, previousContactId: String? = nil, references: [String: Reference]? = nil) {
            self.attributes = attributes
            self.clientToken = clientToken
            self.contactFlowId = contactFlowId
            self.description = description
            self.instanceId = instanceId
            self.name = name
            self.previousContactId = previousContactId
            self.references = references
        }

        public func validate(name: String) throws {
            try self.attributes?.forEach {
                try validate($0.key, name: "attributes.key", parent: name, max: 32767)
                try validate($0.key, name: "attributes.key", parent: name, min: 1)
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, max: 32767)
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, min: 0)
            }
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 500)
            try self.validate(self.contactFlowId, name: "contactFlowId", parent: name, max: 500)
            try self.validate(self.description, name: "description", parent: name, max: 4096)
            try self.validate(self.description, name: "description", parent: name, min: 0)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 512)
            try self.validate(self.name, name: "name", parent: name, min: 0)
            try self.validate(self.previousContactId, name: "previousContactId", parent: name, max: 256)
            try self.validate(self.previousContactId, name: "previousContactId", parent: name, min: 1)
            try self.references?.forEach {
                try validate($0.key, name: "references.key", parent: name, max: 4096)
                try validate($0.key, name: "references.key", parent: name, min: 1)
                try $0.value.validate(name: "\(name).references[\"\($0.key)\"]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
            case clientToken = "ClientToken"
            case contactFlowId = "ContactFlowId"
            case description = "Description"
            case instanceId = "InstanceId"
            case name = "Name"
            case previousContactId = "PreviousContactId"
            case references = "References"
        }
    }

    public struct StartTaskContactResponse: AWSDecodableShape {
        /// The identifier of this contact within the Amazon Connect instance.
        public let contactId: String?

        public init(contactId: String? = nil) {
            self.contactId = contactId
        }

        private enum CodingKeys: String, CodingKey {
            case contactId = "ContactId"
        }
    }

    public struct StopContactRecordingRequest: AWSEncodableShape {
        /// The identifier of the contact.
        public let contactId: String
        /// The identifier of the contact. This is the identifier of the contact associated with the first interaction with the contact center.
        public let initialContactId: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String

        public init(contactId: String, initialContactId: String, instanceId: String) {
            self.contactId = contactId
            self.initialContactId = initialContactId
            self.instanceId = instanceId
        }

        public func validate(name: String) throws {
            try self.validate(self.contactId, name: "contactId", parent: name, max: 256)
            try self.validate(self.contactId, name: "contactId", parent: name, min: 1)
            try self.validate(self.initialContactId, name: "initialContactId", parent: name, max: 256)
            try self.validate(self.initialContactId, name: "initialContactId", parent: name, min: 1)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case contactId = "ContactId"
            case initialContactId = "InitialContactId"
            case instanceId = "InstanceId"
        }
    }

    public struct StopContactRecordingResponse: AWSDecodableShape {
        public init() {}
    }

    public struct StopContactRequest: AWSEncodableShape {
        /// The ID of the contact.
        public let contactId: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String

        public init(contactId: String, instanceId: String) {
            self.contactId = contactId
            self.instanceId = instanceId
        }

        public func validate(name: String) throws {
            try self.validate(self.contactId, name: "contactId", parent: name, max: 256)
            try self.validate(self.contactId, name: "contactId", parent: name, min: 1)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case contactId = "ContactId"
            case instanceId = "InstanceId"
        }
    }

    public struct StopContactResponse: AWSDecodableShape {
        public init() {}
    }

    public struct SuspendContactRecordingRequest: AWSEncodableShape {
        /// The identifier of the contact.
        public let contactId: String
        /// The identifier of the contact. This is the identifier of the contact associated with the first interaction with the contact center.
        public let initialContactId: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String

        public init(contactId: String, initialContactId: String, instanceId: String) {
            self.contactId = contactId
            self.initialContactId = initialContactId
            self.instanceId = instanceId
        }

        public func validate(name: String) throws {
            try self.validate(self.contactId, name: "contactId", parent: name, max: 256)
            try self.validate(self.contactId, name: "contactId", parent: name, min: 1)
            try self.validate(self.initialContactId, name: "initialContactId", parent: name, max: 256)
            try self.validate(self.initialContactId, name: "initialContactId", parent: name, min: 1)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case contactId = "ContactId"
            case initialContactId = "InitialContactId"
            case instanceId = "InstanceId"
        }
    }

    public struct SuspendContactRecordingResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TagResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri(locationName: "resourceArn"))
        ]

        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String
        /// One or more tags. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
        public let tags: [String: String]

        public init(resourceArn: String, tags: [String: String]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.tags.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case tags
        }
    }

    public struct Threshold: AWSEncodableShape & AWSDecodableShape {
        /// The type of comparison. Only "less than" (LT) comparisons are supported.
        public let comparison: Comparison?
        /// The threshold value to compare.
        public let thresholdValue: Double?

        public init(comparison: Comparison? = nil, thresholdValue: Double? = nil) {
            self.comparison = comparison
            self.thresholdValue = thresholdValue
        }

        private enum CodingKeys: String, CodingKey {
            case comparison = "Comparison"
            case thresholdValue = "ThresholdValue"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri(locationName: "resourceArn")),
            AWSMemberEncoding(label: "tagKeys", location: .querystring(locationName: "tagKeys"))
        ]

        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String
        /// The tag keys.
        public let tagKeys: [String]

        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 200)
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct UpdateContactAttributesRequest: AWSEncodableShape {
        /// The Amazon Connect attributes. These attributes can be accessed in contact flows just like any other contact attributes. You can have up to 32,768 UTF-8 bytes across all attributes for a contact. Attribute keys can include only alphanumeric, dash, and underscore characters.
        public let attributes: [String: String]
        /// The identifier of the contact. This is the identifier of the contact associated with the first interaction with the contact center.
        public let initialContactId: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String

        public init(attributes: [String: String], initialContactId: String, instanceId: String) {
            self.attributes = attributes
            self.initialContactId = initialContactId
            self.instanceId = instanceId
        }

        public func validate(name: String) throws {
            try self.attributes.forEach {
                try validate($0.key, name: "attributes.key", parent: name, max: 32767)
                try validate($0.key, name: "attributes.key", parent: name, min: 1)
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, max: 32767)
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, min: 0)
            }
            try self.validate(self.initialContactId, name: "initialContactId", parent: name, max: 256)
            try self.validate(self.initialContactId, name: "initialContactId", parent: name, min: 1)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
            case initialContactId = "InitialContactId"
            case instanceId = "InstanceId"
        }
    }

    public struct UpdateContactAttributesResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateContactFlowContentRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "contactFlowId", location: .uri(locationName: "ContactFlowId")),
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The identifier of the contact flow.
        public let contactFlowId: String
        /// The JSON string that represents contact flow’s content. For an example, see Example contact flow in Amazon Connect Flow language in the Amazon Connect Administrator Guide.
        public let content: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String

        public init(contactFlowId: String, content: String, instanceId: String) {
            self.contactFlowId = contactFlowId
            self.content = content
            self.instanceId = instanceId
        }

        public func validate(name: String) throws {
            try self.validate(self.contactFlowId, name: "contactFlowId", parent: name, max: 500)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case content = "Content"
        }
    }

    public struct UpdateContactFlowNameRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "contactFlowId", location: .uri(locationName: "ContactFlowId")),
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The identifier of the contact flow.
        public let contactFlowId: String
        /// The description of the contact flow.
        public let description: String?
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The name of the contact flow.
        public let name: String?

        public init(contactFlowId: String, description: String? = nil, instanceId: String, name: String? = nil) {
            self.contactFlowId = contactFlowId
            self.description = description
            self.instanceId = instanceId
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.contactFlowId, name: "contactFlowId", parent: name, max: 500)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case name = "Name"
        }
    }

    public struct UpdateInstanceAttributeRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "attributeType", location: .uri(locationName: "AttributeType")),
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The type of attribute.
        public let attributeType: InstanceAttributeType
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The value for the attribute. Maximum character limit is 100.
        public let value: String

        public init(attributeType: InstanceAttributeType, instanceId: String, value: String) {
            self.attributeType = attributeType
            self.instanceId = instanceId
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, max: 100)
            try self.validate(self.value, name: "value", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case value = "Value"
        }
    }

    public struct UpdateInstanceStorageConfigRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "associationId", location: .uri(locationName: "AssociationId")),
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "resourceType", location: .querystring(locationName: "resourceType"))
        ]

        /// The existing association identifier that uniquely identifies the resource type and storage config for the given instance ID.
        public let associationId: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// A valid resource type.
        public let resourceType: InstanceStorageResourceType
        public let storageConfig: InstanceStorageConfig

        public init(associationId: String, instanceId: String, resourceType: InstanceStorageResourceType, storageConfig: InstanceStorageConfig) {
            self.associationId = associationId
            self.instanceId = instanceId
            self.resourceType = resourceType
            self.storageConfig = storageConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.associationId, name: "associationId", parent: name, max: 100)
            try self.validate(self.associationId, name: "associationId", parent: name, min: 1)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.storageConfig.validate(name: "\(name).storageConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case storageConfig = "StorageConfig"
        }
    }

    public struct UpdateQueueHoursOfOperationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "queueId", location: .uri(locationName: "QueueId"))
        ]

        /// The identifier for the hours of operation.
        public let hoursOfOperationId: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The identifier for the queue.
        public let queueId: String

        public init(hoursOfOperationId: String, instanceId: String, queueId: String) {
            self.hoursOfOperationId = hoursOfOperationId
            self.instanceId = instanceId
            self.queueId = queueId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case hoursOfOperationId = "HoursOfOperationId"
        }
    }

    public struct UpdateQueueMaxContactsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "queueId", location: .uri(locationName: "QueueId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The maximum number of contacts that can be in the queue before it is considered full.
        public let maxContacts: Int
        /// The identifier for the queue.
        public let queueId: String

        public init(instanceId: String, maxContacts: Int, queueId: String) {
            self.instanceId = instanceId
            self.maxContacts = maxContacts
            self.queueId = queueId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.maxContacts, name: "maxContacts", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case maxContacts = "MaxContacts"
        }
    }

    public struct UpdateQueueNameRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "queueId", location: .uri(locationName: "QueueId"))
        ]

        /// The description of the queue.
        public let description: String?
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The name of the queue.
        public let name: String?
        /// The identifier for the queue.
        public let queueId: String

        public init(description: String? = nil, instanceId: String, name: String? = nil, queueId: String) {
            self.description = description
            self.instanceId = instanceId
            self.name = name
            self.queueId = queueId
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 250)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 127)
            try self.validate(self.name, name: "name", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case name = "Name"
        }
    }

    public struct UpdateQueueOutboundCallerConfigRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "queueId", location: .uri(locationName: "QueueId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The outbound caller ID name, number, and outbound whisper flow.
        public let outboundCallerConfig: OutboundCallerConfig
        /// The identifier for the queue.
        public let queueId: String

        public init(instanceId: String, outboundCallerConfig: OutboundCallerConfig, queueId: String) {
            self.instanceId = instanceId
            self.outboundCallerConfig = outboundCallerConfig
            self.queueId = queueId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.outboundCallerConfig.validate(name: "\(name).outboundCallerConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case outboundCallerConfig = "OutboundCallerConfig"
        }
    }

    public struct UpdateQueueStatusRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "queueId", location: .uri(locationName: "QueueId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The identifier for the queue.
        public let queueId: String
        /// The status of the queue.
        public let status: QueueStatus

        public init(instanceId: String, queueId: String, status: QueueStatus) {
            self.instanceId = instanceId
            self.queueId = queueId
            self.status = status
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case status = "Status"
        }
    }

    public struct UpdateQuickConnectConfigRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "quickConnectId", location: .uri(locationName: "QuickConnectId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// Information about the configuration settings for the quick connect.
        public let quickConnectConfig: QuickConnectConfig
        /// The identifier for the quick connect.
        public let quickConnectId: String

        public init(instanceId: String, quickConnectConfig: QuickConnectConfig, quickConnectId: String) {
            self.instanceId = instanceId
            self.quickConnectConfig = quickConnectConfig
            self.quickConnectId = quickConnectId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.quickConnectConfig.validate(name: "\(name).quickConnectConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case quickConnectConfig = "QuickConnectConfig"
        }
    }

    public struct UpdateQuickConnectNameRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "quickConnectId", location: .uri(locationName: "QuickConnectId"))
        ]

        /// The description of the quick connect.
        public let description: String?
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The name of the quick connect.
        public let name: String?
        /// The identifier for the quick connect.
        public let quickConnectId: String

        public init(description: String? = nil, instanceId: String, name: String? = nil, quickConnectId: String) {
            self.description = description
            self.instanceId = instanceId
            self.name = name
            self.quickConnectId = quickConnectId
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 250)
            try self.validate(self.description, name: "description", parent: name, min: 0)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 127)
            try self.validate(self.name, name: "name", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case name = "Name"
        }
    }

    public struct UpdateRoutingProfileConcurrencyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "routingProfileId", location: .uri(locationName: "RoutingProfileId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The channels that agents can handle in the Contact Control Panel (CCP).
        public let mediaConcurrencies: [MediaConcurrency]
        /// The identifier of the routing profile.
        public let routingProfileId: String

        public init(instanceId: String, mediaConcurrencies: [MediaConcurrency], routingProfileId: String) {
            self.instanceId = instanceId
            self.mediaConcurrencies = mediaConcurrencies
            self.routingProfileId = routingProfileId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.mediaConcurrencies.forEach {
                try $0.validate(name: "\(name).mediaConcurrencies[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case mediaConcurrencies = "MediaConcurrencies"
        }
    }

    public struct UpdateRoutingProfileDefaultOutboundQueueRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "routingProfileId", location: .uri(locationName: "RoutingProfileId"))
        ]

        /// The identifier for the default outbound queue.
        public let defaultOutboundQueueId: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The identifier of the routing profile.
        public let routingProfileId: String

        public init(defaultOutboundQueueId: String, instanceId: String, routingProfileId: String) {
            self.defaultOutboundQueueId = defaultOutboundQueueId
            self.instanceId = instanceId
            self.routingProfileId = routingProfileId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case defaultOutboundQueueId = "DefaultOutboundQueueId"
        }
    }

    public struct UpdateRoutingProfileNameRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "routingProfileId", location: .uri(locationName: "RoutingProfileId"))
        ]

        /// The description of the routing profile. Must not be more than 250 characters.
        public let description: String?
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The name of the routing profile. Must not be more than 127 characters.
        public let name: String?
        /// The identifier of the routing profile.
        public let routingProfileId: String

        public init(description: String? = nil, instanceId: String, name: String? = nil, routingProfileId: String) {
            self.description = description
            self.instanceId = instanceId
            self.name = name
            self.routingProfileId = routingProfileId
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 250)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 127)
            try self.validate(self.name, name: "name", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case name = "Name"
        }
    }

    public struct UpdateRoutingProfileQueuesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "routingProfileId", location: .uri(locationName: "RoutingProfileId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The queues to be updated for this routing profile. Queues must first be associated to the routing profile. You can do this using AssociateRoutingProfileQueues.
        public let queueConfigs: [RoutingProfileQueueConfig]
        /// The identifier of the routing profile.
        public let routingProfileId: String

        public init(instanceId: String, queueConfigs: [RoutingProfileQueueConfig], routingProfileId: String) {
            self.instanceId = instanceId
            self.queueConfigs = queueConfigs
            self.routingProfileId = routingProfileId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.queueConfigs.forEach {
                try $0.validate(name: "\(name).queueConfigs[]")
            }
            try self.validate(self.queueConfigs, name: "queueConfigs", parent: name, max: 10)
            try self.validate(self.queueConfigs, name: "queueConfigs", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case queueConfigs = "QueueConfigs"
        }
    }

    public struct UpdateUserHierarchyGroupNameRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "hierarchyGroupId", location: .uri(locationName: "HierarchyGroupId")),
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The identifier of the hierarchy group.
        public let hierarchyGroupId: String
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The name of the hierarchy group. Must not be more than 100 characters.
        public let name: String

        public init(hierarchyGroupId: String, instanceId: String, name: String) {
            self.hierarchyGroupId = hierarchyGroupId
            self.instanceId = instanceId
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct UpdateUserHierarchyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "userId", location: .uri(locationName: "UserId"))
        ]

        /// The identifier of the hierarchy group.
        public let hierarchyGroupId: String?
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The identifier of the user account.
        public let userId: String

        public init(hierarchyGroupId: String? = nil, instanceId: String, userId: String) {
            self.hierarchyGroupId = hierarchyGroupId
            self.instanceId = instanceId
            self.userId = userId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case hierarchyGroupId = "HierarchyGroupId"
        }
    }

    public struct UpdateUserHierarchyStructureRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId"))
        ]

        /// The hierarchy levels to update.
        public let hierarchyStructure: HierarchyStructureUpdate
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String

        public init(hierarchyStructure: HierarchyStructureUpdate, instanceId: String) {
            self.hierarchyStructure = hierarchyStructure
            self.instanceId = instanceId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case hierarchyStructure = "HierarchyStructure"
        }
    }

    public struct UpdateUserIdentityInfoRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "userId", location: .uri(locationName: "UserId"))
        ]

        /// The identity information for the user.
        public let identityInfo: UserIdentityInfo
        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The identifier of the user account.
        public let userId: String

        public init(identityInfo: UserIdentityInfo, instanceId: String, userId: String) {
            self.identityInfo = identityInfo
            self.instanceId = instanceId
            self.userId = userId
        }

        public func validate(name: String) throws {
            try self.identityInfo.validate(name: "\(name).identityInfo")
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case identityInfo = "IdentityInfo"
        }
    }

    public struct UpdateUserPhoneConfigRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "userId", location: .uri(locationName: "UserId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// Information about phone configuration settings for the user.
        public let phoneConfig: UserPhoneConfig
        /// The identifier of the user account.
        public let userId: String

        public init(instanceId: String, phoneConfig: UserPhoneConfig, userId: String) {
            self.instanceId = instanceId
            self.phoneConfig = phoneConfig
            self.userId = userId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.phoneConfig.validate(name: "\(name).phoneConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case phoneConfig = "PhoneConfig"
        }
    }

    public struct UpdateUserRoutingProfileRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "userId", location: .uri(locationName: "UserId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The identifier of the routing profile for the user.
        public let routingProfileId: String
        /// The identifier of the user account.
        public let userId: String

        public init(instanceId: String, routingProfileId: String, userId: String) {
            self.instanceId = instanceId
            self.routingProfileId = routingProfileId
            self.userId = userId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case routingProfileId = "RoutingProfileId"
        }
    }

    public struct UpdateUserSecurityProfilesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "instanceId", location: .uri(locationName: "InstanceId")),
            AWSMemberEncoding(label: "userId", location: .uri(locationName: "UserId"))
        ]

        /// The identifier of the Amazon Connect instance.
        public let instanceId: String
        /// The identifiers of the security profiles for the user.
        public let securityProfileIds: [String]
        /// The identifier of the user account.
        public let userId: String

        public init(instanceId: String, securityProfileIds: [String], userId: String) {
            self.instanceId = instanceId
            self.securityProfileIds = securityProfileIds
            self.userId = userId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceId, name: "instanceId", parent: name, max: 100)
            try self.validate(self.instanceId, name: "instanceId", parent: name, min: 1)
            try self.validate(self.securityProfileIds, name: "securityProfileIds", parent: name, max: 10)
            try self.validate(self.securityProfileIds, name: "securityProfileIds", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case securityProfileIds = "SecurityProfileIds"
        }
    }

    public struct UseCase: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) for the use case.
        public let useCaseArn: String?
        /// The identifier for the use case.
        public let useCaseId: String?
        /// The type of use case to associate to the AppIntegration association. Each AppIntegration association can have only one of each use case type.
        public let useCaseType: UseCaseType?

        public init(useCaseArn: String? = nil, useCaseId: String? = nil, useCaseType: UseCaseType? = nil) {
            self.useCaseArn = useCaseArn
            self.useCaseId = useCaseId
            self.useCaseType = useCaseType
        }

        private enum CodingKeys: String, CodingKey {
            case useCaseArn = "UseCaseArn"
            case useCaseId = "UseCaseId"
            case useCaseType = "UseCaseType"
        }
    }

    public struct User: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the user account.
        public let arn: String?
        /// The identifier of the user account in the directory used for identity management.
        public let directoryUserId: String?
        /// The identifier of the hierarchy group for the user.
        public let hierarchyGroupId: String?
        /// The identifier of the user account.
        public let id: String?
        /// Information about the user identity.
        public let identityInfo: UserIdentityInfo?
        /// Information about the phone configuration for the user.
        public let phoneConfig: UserPhoneConfig?
        /// The identifier of the routing profile for the user.
        public let routingProfileId: String?
        /// The identifiers of the security profiles for the user.
        public let securityProfileIds: [String]?
        /// The tags.
        public let tags: [String: String]?
        /// The user name assigned to the user account.
        public let username: String?

        public init(arn: String? = nil, directoryUserId: String? = nil, hierarchyGroupId: String? = nil, id: String? = nil, identityInfo: UserIdentityInfo? = nil, phoneConfig: UserPhoneConfig? = nil, routingProfileId: String? = nil, securityProfileIds: [String]? = nil, tags: [String: String]? = nil, username: String? = nil) {
            self.arn = arn
            self.directoryUserId = directoryUserId
            self.hierarchyGroupId = hierarchyGroupId
            self.id = id
            self.identityInfo = identityInfo
            self.phoneConfig = phoneConfig
            self.routingProfileId = routingProfileId
            self.securityProfileIds = securityProfileIds
            self.tags = tags
            self.username = username
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case directoryUserId = "DirectoryUserId"
            case hierarchyGroupId = "HierarchyGroupId"
            case id = "Id"
            case identityInfo = "IdentityInfo"
            case phoneConfig = "PhoneConfig"
            case routingProfileId = "RoutingProfileId"
            case securityProfileIds = "SecurityProfileIds"
            case tags = "Tags"
            case username = "Username"
        }
    }

    public struct UserIdentityInfo: AWSEncodableShape & AWSDecodableShape {
        /// The email address. If you are using SAML for identity management and include this parameter, an error is returned.
        public let email: String?
        /// The first name. This is required if you are using Amazon Connect or SAML for identity management.
        public let firstName: String?
        /// The last name. This is required if you are using Amazon Connect or SAML for identity management.
        public let lastName: String?

        public init(email: String? = nil, firstName: String? = nil, lastName: String? = nil) {
            self.email = email
            self.firstName = firstName
            self.lastName = lastName
        }

        public func validate(name: String) throws {
            try self.validate(self.firstName, name: "firstName", parent: name, max: 100)
            try self.validate(self.firstName, name: "firstName", parent: name, min: 1)
            try self.validate(self.lastName, name: "lastName", parent: name, max: 100)
            try self.validate(self.lastName, name: "lastName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case email = "Email"
            case firstName = "FirstName"
            case lastName = "LastName"
        }
    }

    public struct UserPhoneConfig: AWSEncodableShape & AWSDecodableShape {
        /// The After Call Work (ACW) timeout setting, in seconds.
        public let afterContactWorkTimeLimit: Int?
        /// The Auto accept setting.
        public let autoAccept: Bool?
        /// The phone number for the user's desk phone.
        public let deskPhoneNumber: String?
        /// The phone type.
        public let phoneType: PhoneType

        public init(afterContactWorkTimeLimit: Int? = nil, autoAccept: Bool? = nil, deskPhoneNumber: String? = nil, phoneType: PhoneType) {
            self.afterContactWorkTimeLimit = afterContactWorkTimeLimit
            self.autoAccept = autoAccept
            self.deskPhoneNumber = deskPhoneNumber
            self.phoneType = phoneType
        }

        public func validate(name: String) throws {
            try self.validate(self.afterContactWorkTimeLimit, name: "afterContactWorkTimeLimit", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case afterContactWorkTimeLimit = "AfterContactWorkTimeLimit"
            case autoAccept = "AutoAccept"
            case deskPhoneNumber = "DeskPhoneNumber"
            case phoneType = "PhoneType"
        }
    }

    public struct UserQuickConnectConfig: AWSEncodableShape & AWSDecodableShape {
        /// The identifier of the contact flow.
        public let contactFlowId: String
        /// The identifier of the user.
        public let userId: String

        public init(contactFlowId: String, userId: String) {
            self.contactFlowId = contactFlowId
            self.userId = userId
        }

        public func validate(name: String) throws {
            try self.validate(self.contactFlowId, name: "contactFlowId", parent: name, max: 500)
        }

        private enum CodingKeys: String, CodingKey {
            case contactFlowId = "ContactFlowId"
            case userId = "UserId"
        }
    }

    public struct UserSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the user account.
        public let arn: String?
        /// The identifier of the user account.
        public let id: String?
        /// The Amazon Connect user name of the user account.
        public let username: String?

        public init(arn: String? = nil, id: String? = nil, username: String? = nil) {
            self.arn = arn
            self.id = id
            self.username = username
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case id = "Id"
            case username = "Username"
        }
    }

    public struct VoiceRecordingConfiguration: AWSEncodableShape {
        /// Identifies which track is being recorded.
        public let voiceRecordingTrack: VoiceRecordingTrack?

        public init(voiceRecordingTrack: VoiceRecordingTrack? = nil) {
            self.voiceRecordingTrack = voiceRecordingTrack
        }

        private enum CodingKeys: String, CodingKey {
            case voiceRecordingTrack = "VoiceRecordingTrack"
        }
    }
}
